|
| 1 | +--- |
| 2 | +name: manage-local-skills |
| 3 | +description: Analyze, standardize, validate, and sync locally maintained skills into agent skill directories with a `skills` CLI-aligned workflow. Use this skill when Codex needs to turn ad-hoc prompt or rules folders into reusable `SKILL.md`-based skills, install or sync one or more local skills from `./skills` into Claude, Cursor, CodeBuddy, Codex, or similar agent directories, or manage local skill path mappings and symlink or copy installation behavior. |
| 4 | +--- |
| 5 | + |
| 6 | +# Manage Local Skills |
| 7 | + |
| 8 | +Manage locally maintained skills as reusable, standard skill assets. |
| 9 | + |
| 10 | +## What this skill does |
| 11 | + |
| 12 | +Use this skill to: |
| 13 | + |
| 14 | +- classify local sources as standard skills, non-standard skill-like folders, or mixed repositories |
| 15 | +- convert non-standard local materials into a standard `SKILL.md`-based structure |
| 16 | +- validate standard skill structure before installation |
| 17 | +- sync one or more local skills into one or more agent skill directories |
| 18 | +- maintain explicit agent and IDE path mappings for local skill installation |
| 19 | + |
| 20 | +## Do not use this skill for |
| 21 | + |
| 22 | +- publishing remote skills registries or package indexes |
| 23 | +- cloning skills from remote repositories |
| 24 | +- interactive marketplace search |
| 25 | +- generic documentation cleanup unrelated to local skill structure |
| 26 | + |
| 27 | +## Workflow |
| 28 | + |
| 29 | +1. Identify whether the user wants analysis only, migration, validation, mapping changes, or installation. |
| 30 | +2. If the source is not obviously standard, read `references/source-classification.md` and run `scripts/inspect-source.mjs` first. |
| 31 | +3. If migration is needed, read `references/migration-playbook.md` and convert the source into a standard skill folder before installation. |
| 32 | +4. Before mounting a skill, read `references/cli-alignment.md` and `references/install-workflow.md` to preserve the canonical-install model. |
| 33 | +5. Use `scripts/validate-skill.mjs` before and after installation when structure or path correctness is in doubt. |
| 34 | +6. If the target agent is new or unclear, read `references/mapping-extension.md` before adding or changing mappings. |
| 35 | + |
| 36 | +## Common requests |
| 37 | + |
| 38 | +- "Install this local skill into Claude and Cursor." |
| 39 | +- "Sync everything under `./skills` to Codex and CodeBuddy." |
| 40 | +- "Turn this prompts folder into a reusable skill." |
| 41 | +- "Link my local skills into the agent directories for this project." |
| 42 | + |
| 43 | +## Routing |
| 44 | + |
| 45 | +| Task | Read | Script | |
| 46 | +| --- | --- | --- | |
| 47 | +| Understand how this differs from or aligns with `skills` CLI | `references/cli-alignment.md` | | |
| 48 | +| Classify local sources and detect migration candidates | `references/source-classification.md` | `scripts/inspect-source.mjs` | |
| 49 | +| Convert non-standard local folders into standard skills | `references/migration-playbook.md` | `scripts/inspect-source.mjs` | |
| 50 | +| Install or mount local skills into agent directories | `references/install-workflow.md` | `scripts/install-skill.mjs` | |
| 51 | +| Add or update agent mappings | `references/mapping-extension.md` | `scripts/install-skill.mjs` | |
| 52 | +| Validate structure or installation results | `references/install-workflow.md` | `scripts/validate-skill.mjs` | |
| 53 | + |
| 54 | +## Operating rules |
| 55 | + |
| 56 | +- Treat `skills` CLI installation semantics as the behavioral baseline for canonical directory layout, scope handling, and symlink fallback. |
| 57 | +- Prefer analysis first when the source structure is ambiguous. |
| 58 | +- Do not execute arbitrary scripts from the source folder while inspecting it. |
| 59 | +- Keep local source directories distinct from canonical install directories. |
| 60 | +- Prefer symlinks when supported and safe. Fall back to copy when the user requests it or symlinks fail. |
| 61 | +- Make scope explicit: `project` means the current workspace, `global` means the user-level agent directory. |
| 62 | +- Ask the user to confirm before writing files, replacing existing installs, changing mappings, or converting a non-standard source into a standard skill. |
| 63 | +- If the user asks to sync multiple skills or multiple agents, summarize the planned batch operation before execution and wait for confirmation. |
| 64 | +- Call out differences whenever the requested behavior cannot fully match `skills` CLI. |
| 65 | + |
| 66 | +## Quick commands |
| 67 | + |
| 68 | +```bash |
| 69 | +node skills/manage-local-skills/scripts/inspect-source.mjs --input <path> --json |
| 70 | +node skills/manage-local-skills/scripts/validate-skill.mjs --skill-dir <path> |
| 71 | +node skills/manage-local-skills/scripts/install-skill.mjs --source-dir skills --skill <name> --agent cursor --scope project --mode symlink |
| 72 | +``` |
| 73 | + |
| 74 | +## Minimum self-check |
| 75 | + |
| 76 | +- Is the source clearly classified as `standard`, `nonstandard`, or `mixed`? |
| 77 | +- Is the target skill structure valid before installation? |
| 78 | +- Is the canonical install path separate from the maintained source directory? |
| 79 | +- Is the selected agent mapping explicit and correct for the requested scope? |
| 80 | +- If symlink mode is used, is there a defined fallback to copy mode? |
| 81 | +- If behavior differs from `skills` CLI, did you state the difference clearly? |
0 commit comments