agentleFS
pji2918pji2918/agent-skills/skills/code-editing/SKILL.md

code-editing

Skill1 starsChanged 12 days agoApache-2.0View on GitHub

Use whenever code or files need to be created, modified, or refactored. The orchestrator must not use Edit/Write directly; it delegates every edit to the `code-editor` subagent. Exceptions - plan-mode plan files and memory files.

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 5 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    All file edits are delegated to the code-editor subagent (Agent tool, subagent_type: "code-editor").

    line 8
  2. Distinctive:

    Follow the user's approval rules for risky work (changing existing code, adding features): present the plan and get approval before …

    line 20
  3. Very specific:

    Read the relevant code yourself (Read/Grep/Glob are fine) so the instruction is concrete.

    line 21
  4. Distinctive:

    Write a self-contained prompt.

    line 25
  5. Distinctive:

    If the result is wrong or incomplete, re-delegate with corrected instructions rather than editing directly.

    line 35
  6. Distinctive:

    Never delete files. Tell the user the target file and the reason, and ask them to delete it.

    line 40
  7. Distinctive:

    Never edit outside the requested scope.

    line 41

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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

Code Editing via Subagent

All file edits are delegated to the code-editor subagent (Agent tool, subagent_type: "code-editor"). Do not call Edit, Write, or NotebookEdit yourself.

Exceptions (edit directly)

  • Plan files written in plan mode
  • Memory files (the persistent memory directory and its index)

Everything else, including one-line fixes, config files, and docs, goes to code-editor.

Before delegating

  • Resolve ambiguity first. code-editor does not guess, so ask the user about unclear requirements or important decisions before delegating.
  • Follow the user's approval rules for risky work (changing existing code, adding features): present the plan and get approval before delegating.
  • Read the relevant code yourself (Read/Grep/Glob are fine) so the instruction is concrete.

What to hand down

Write a self-contained prompt. The subagent has no conversation context.

  • Target files (full paths) and what to change
  • The exact logic or behavior to implement
  • Constraints: follow existing style, reuse existing code (name known candidates), stay in scope
  • Expected report: changed files, summary per file, unresolved points

After delegating

  • Review the reported changes (Read the edited files if needed). Do not trust the summary blindly.
  • If the result is wrong or incomplete, re-delegate with corrected instructions rather than editing directly.
  • Summarize the outcome for the user. Verification commands (build, test) go through the terminal-exec skill.

Never

  • Never delete files. Tell the user the target file and the reason, and ask them to delete it.
  • Never edit outside the requested scope.

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.