agentleFS
flopperjflopperj/dotfiles-core/.claude/skills/core-edit/SKILL.md

core-edit

Skill3 starsChanged 9 days agoMITView on GitHub

Edit a skill inside dotfiles-core from within an overlay repo — handles the cd, commit, push, and submodule pointer-bump sequence. Use when the user says /core-edit <skill>, 'edit core skill', or 'update core'. Automates the cross-repo edit workflow.

  • Commits and pushes

The file

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 7 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If either check fails:

    line 37
  2. Very specific:

    Check that .claude/dotfiles-core/.claude/skills/<skill-name>/ exists.

    line 55
  3. Distinctive:

    If found: confirm the path and proceed.

    line 65
  4. Distinctive:

    Before editing, show the user what's in the skill:

    line 71
  5. Distinctive:

    Ask the user what they want to change.

    line 83
  6. Distinctive:

    Run leakage check on the modified file before proceeding:

    line 90
  7. Distinctive:

    If the leakage check fails, it reports file/line references only (matched content is withheld by design) — ask the user to revise the edit …

    line 96
  8. Distinctive:

    Pointer bump is mandatory: after every core commit. Leaving the overlay pinned to an old SHA creates confusion.

    line 196

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Core-Edit — Cross-Repo Skill Editor

Edit a skill inside dotfiles-core from within an overlay repo. Handles the submodule cd, commit, push (to both remotes), and overlay pointer-bump in one supervised sequence.


Prerequisites

This skill requires an overlay context — a repo with .gitmodules referencing .claude/dotfiles-core. Running it from a standalone dotfiles-core clone is an error.


Step 1 — Detect context

Verify overlay context:

# Must be run from the overlay root (or a subdir)
# Find overlay root by walking up to find .gitmodules
git rev-parse --show-toplevel

Check:

  1. The result has .gitmodules at the root that references dotfiles-core.
  2. .claude/dotfiles-core/.git exists (submodule initialized).

If either check fails:

ERROR: /core-edit must be run from inside an overlay repo with a dotfiles-core submodule.
Current directory does not appear to be an overlay root.
Hint: cd to your dotfiles overlay directory and re-run.

Stop.


Step 2 — Validate skill argument

The user must provide a skill name:

/core-edit <skill-name>

Check that .claude/dotfiles-core/.claude/skills/<skill-name>/ exists.

If missing:

ERROR: skill '<skill-name>' not found in dotfiles-core.
Available skills:
  <list from ls .claude/dotfiles-core/.claude/skills/>

Stop.

If found: confirm the path and proceed.


Step 3 — Show current content

Before editing, show the user what's in the skill:

cat .claude/dotfiles-core/.claude/skills/<skill-name>/SKILL.md | head -30

Report: "Opening .claude/dotfiles-core/.claude/skills/<skill-name>/SKILL.md for editing."


Step 4 — Present targeted edit

Ask the user what they want to change. Receive the edit intent and apply it using the standard Edit tool on the file at:

.claude/dotfiles-core/.claude/skills/<skill-name>/SKILL.md

Run leakage check on the modified file before proceeding:

bash .claude/dotfiles-core/scripts/check-no-leakage.sh .claude/dotfiles-core/.claude/skills/<skill-name>/

If the leakage check fails, it reports file/line references only (matched content is withheld by design) — ask the user to revise the edit against those locations and re-check. Do not commit a file with leakage tokens. On machines without the company-context marker the check skips cleanly.


Step 5 — Show diff and confirm

git -C .claude/dotfiles-core diff .claude/skills/<skill-name>/

Present the diff. Ask:

Commit this change to dotfiles-core?
  -> y = Yes, commit and push
  -> n = Discard
  -> e = Edit more

Step 6 — Commit and push to core

On y:

cd .claude/dotfiles-core
git add .claude/skills/<skill-name>/
git commit -m "feat(<skill-name>): <user-provided description>"
git push origin main
cd ../..

Report the commit SHA:

Committed to dotfiles-core: <sha> — <message>
Pushed to origin (GHE).

Step 7 — Bump submodule pointer in overlay

# In overlay root
new_sha=$(git -C .claude/dotfiles-core rev-parse --short HEAD)
git add .claude/dotfiles-core
# Overlays that install from a copied tree (no VCS at $HOME) pin core in a
# tracked version file; keep it in step with the submodule pointer.
if [ -f .claude/dotfiles-core.version ]; then
  # Braces bind the redirect to both branches; without them a tagged HEAD
  # prints the tag to the terminal and the file keeps its old value.
  { git -C .claude/dotfiles-core describe --tags --exact-match HEAD 2>/dev/null \
      || git -C .claude/dotfiles-core rev-parse HEAD; } > .claude/dotfiles-core.version
  git add .claude/dotfiles-core.version
fi
git commit -m "core: bump pointer to ${new_sha} (<skill-name> update)"

Report:

Overlay submodule pointer bumped to <new_sha>.
Commit: core: bump pointer to <new_sha> (<skill-name> update)

Step 8 — Reinstall

Re-run core's installer to pick up any changes to the skill directory (symlinks are resolved at install time, so this is usually a no-op for skill edits — but it ensures freshness):

bash .claude/dotfiles-core/install.sh

Summary

Report:

/core-edit complete.
  Skill:         <skill-name>
  Core commit:   <sha>
  Pointer bump:  overlay @ <new_sha>
  Reinstall:     done

Gate rules

  • Always confirm before committing to either repo (Step 5 gate).
  • Never commit a leakage-check failure. The check in Step 4 is mandatory.
  • Never edit files outside the target skill directory in the core repo.
  • Pointer bump is mandatory after every core commit. Leaving the overlay pinned to an old SHA creates confusion.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.