Skill Management with Mirroring

VerifiedCaution

Create or update a Duchess skill, automatically mirrored to both .github/skills/ and .claude/skills/ directories.

Sby Skills Guide Bot
DevelopmentIntermediate
7/22/2026
Claude CodeCopilot
#skill-authoring#mirroring#git-hooks#repo-sync#claude-code

Recommended for

Automated summary

Creates or updates a Duchess skill under .github/skills/ and automatically mirrors it to .claude/skills/ while registering it in the settings.

Strengths

  • One command produces the canonical file, the mirror, and the .claude/settings.json registration
  • The mirror-skills.sh check script and pre-commit hook block commits when skills are out of sync
  • The post-merge hook runs mirror-skills.sh auto to resynchronize after pulls
  • The canonical/mirror rule is explicit: the generated .claude copy must not be edited by hand

Limitations

  • Assumes the repo already contains scripts/mirror-skills.sh and that git hooks are installed
  • Tightly coupled to the Duchess SKILL.md format and the .github/skills + .claude/skills layout
  • Automatic edits to .claude/settings.json can conflict with manual configuration
When to use it

Use it when adding or revising a skill that must exist in both .github/skills/ and .claude/skills/ in this repository.

When not to use it

Avoid it outside this repo layout, without the mirror script and hooks installed, or for a skill targeting a single other tool only.

Security analysis

Caution
Quality score76/100

Nothing here is destructive or exfiltration-oriented: there are no curl|sh pipelines, no rm -rf, no secret/token handling, and no obfuscated payloads. The skill does, however, invoke an external shell script by name, write skill files into the repo, and edit .claude/settings.json automatically, which is powerful local tooling used for a legitimate purpose. That places it in 'caution' rather than 'safe' — risk is bounded by trusting the repo's own mirror-skills.sh script.

Findings
  • •Executes a repository shell script (scripts/mirror-skills.sh) whose contents are not included in the skill definition
  • •Automatically modifies .claude/settings.json to register new skills, changing agent configuration without an explicit confirmation step
  • •Writes files into two locations (.github/skills and .claude/skills) and can be driven by hooks (pre-commit/post-merge) that run automatically
How this analysis is made

Examples

New edge inference skill
/skill edge-inference "Optimize and deploy ML inference on edge devices with LiteRT and ONNX"
PPE pipeline skill
/skill ppe-detection-pipeline "End-to-end PPE pipeline from glasses camera to worker alert"
Update and resync an existing skill
Update the existing edge-inference skill, then run ./scripts/mirror-skills.sh github to confirm both .github and .claude copies are in sync.

description: Create or update a skill and mirror it to both .github/skills/ and .claude/skills/

Create a new Duchess skill or update an existing one, automatically mirrored to both AI tool directories.

Usage

/skill <skill-name> [description]

Example:

/skill edge-inference "Optimize and deploy ML inference on edge devices with LiteRT and ONNX"
/skill ppe-detection-pipeline "End-to-end PPE pipeline from glasses camera to worker alert"

What this command does

  1. Creates .github/skills/<skill-name>/SKILL.md with the Duchess SKILL format
  2. Runs scripts/mirror-skills.sh github to mirror it to .claude/skills/<skill-name>.md
  3. Updates .claude/settings.json to register the new skill
  4. Confirms both files are in sync

Skill file format

.github/skills/<name>/SKILL.md (canonical)

---
name: <name>
description: "<one-line description>"
---

# <Name>

## When to Use
- ...

## Procedure
1. ...

## Key Patterns
...

## Pitfalls
...

.claude/skills/<name>.md (auto-generated mirror)

Generated automatically by mirror-skills.sh from the .github canonical. Do not edit the .claude copy directly — edits will be overwritten on next sync.

Mirror rules

| Source | Destination | When | |--------|-------------|------| | .github/skills/*/SKILL.md | .claude/skills/*.md | Skill created/updated in .github | | .claude/skills/*.md | .github/skills/*/SKILL.md | Skill created directly in .claude | | Either | Both | scripts/mirror-skills.sh auto |

The pre-commit hook runs mirror-skills.sh check — commits are blocked if skills are out of sync. The post-merge hook runs mirror-skills.sh auto — pulls automatically keep skills in sync.

Quickstart

# After creating a .github/skills/<name>/SKILL.md manually:
./scripts/mirror-skills.sh github

# After creating a .claude/skills/<name>.md manually:
./scripts/mirror-skills.sh claude

# Check for drift without modifying anything:
./scripts/mirror-skills.sh check

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/skill-management-with-mirroring-mrwakeok/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/skill-management-with-mirroring-mrwakeok' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/skill-management-with-mirroring-mrwakeok/download' --output '.skill-downloads/skill-management-with-mirroring-mrwakeok/SKILL.md.part' && mv '.skill-downloads/skill-management-with-mirroring-mrwakeok/SKILL.md.part' '.skill-downloads/skill-management-with-mirroring-mrwakeok/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

This file does not provide a usable name/description header for this native procedure. It remains available to download and inspect; use the manual method below.

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/skill-management-with-mirroring-mrwakeok/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills