Modify Skill

VerifiedCaution

Update or correct existing skill files based on judge feedback or improved understanding. Includes methods for appending corrections, replacing sections, or full rewrites.

Sby Skills Guide Bot
DocumentationIntermediate
8/6/2026
Claude CodeCodex
#skill-maintenance#self-correction#feedback-loop#markdown-editing#agent-memory

Recommended for

Automated summary

Updates or corrects an existing SKILL.md file based on judge feedback or a better understanding, offering three levels of intervention: appending a correction note, replacing a section, or fully rewriting the file.

Strengths

  • Three graduated edit modes (append, section replacement, full rewrite) let you pick the level of risk
  • The directory loop propagates the same correction to every skill installation at once
  • Explicitly favors appending a 'Correction' section to preserve history and keep edits visible
  • Ships concrete corrected examples (HP filter lambda, Macaulay duration denominator)

Limitations

  • Directory paths and the /root/modify_skill_helper.py helper are hardcoded to the author's environment
  • Repeated correction notes can duplicate content or bloat a SKILL.md with no cleanup step
  • Apart from the advice to test before saving, it describes no validation or format check after editing
When to use it

Use it when judge feedback flags a specific error in an existing skill, or when you have just found a better implementation to record.

When not to use it

Avoid it when authoring a brand-new skill, or when your skill directories do not match the hardcoded paths the script expects.

Security analysis

Caution
Quality score80/100

The skill legitimately uses Bash to modify skill files across multiple agent directories. There is no exfiltration, obfuscation, or destructive command like rm -rf, but it does grant broad write access to system-level skill locations and offers a full-replace option, so it warrants caution rather than a safe rating.

Findings
  • •Uses Bash to write to system-level skill directories under /root for multiple agent frameworks (.claude, .codex, .gemini, etc.)
  • •Option C supports full-file replacement, which can overwrite/ destroy an existing skill file if misused
  • •Relies on an external helper script /root/modify_skill_helper.py whose contents are not provided or auditable
  • •Append operations use shell string concatenation; not inherently dangerous but error-prone with special characters
How this analysis is made

Examples

Fix a wrong lambda
The judge scored 0.42 and said the HP filter lambda for annual data was wrong. Update the hp-filter-detrend skill with a correction note.
Add a pitfall after a mistake
I just got the Macaulay duration wrong by dividing by face value instead of bond price. Append a 'Common Pitfalls' correction to the bond-ytm-duration skill across all skill directories.
Replace a broken section
The '## Lambda Values' section in hp-filter-detrend has the wrong table. Replace just that section with the corrected annual/quarterly/monthly values using the helper script.

name: modify-skill description: Update or correct an existing skill file based on judge feedback or improved understanding. allowed-tools: Read Write Bash

modify-skill

When judge feedback reveals an error in your approach, or you discover a better implementation, update the existing skill so you don't repeat the same mistake.

When to Use

  • Judge feedback says "Score: < 0.6" and mentions a specific calculation error
  • You discover a wrong formula in an existing skill (e.g., wrong lambda for HP filter)
  • You want to add a "Common Pitfalls" section based on a mistake you just made
  • A skill's code example fails to run and you found the correct version

Usage

Option A: Append a correction note (safest)

SKILL_NAME="hp-filter-detrend"
CORRECTION='\n\n## Correction (added from judge feedback)\nFor ANNUAL data, lambda=100 (not 1600).\n1600 is for QUARTERLY data. 14400 is for MONTHLY data.'

for DIR in /root/.claude/skills /root/.terminus/skills /root/.codex/skills /root/.opencode/skill /root/.goose/skills /root/.factory/skills /root/.agents/skills /root/.gemini/skills; do
    SKILL_FILE="$DIR/$SKILL_NAME/SKILL.md"
    if [ -f "$SKILL_FILE" ]; then
        printf '%s' "$CORRECTION" >> "$SKILL_FILE"
    fi
done
echo "Appended correction to '$SKILL_NAME'"

Option B: Replace a specific section

python3 /root/modify_skill_helper.py \
  --name "hp-filter-detrend" \
  --replace-section "## Lambda Values" \
  --new-content "## Lambda Values (Corrected)
| Frequency | Lambda |
|-----------|--------|
| Annual    | 100    |
| Quarterly | 1600   |
| Monthly   | 14400  |"

Option C: Full rewrite

python3 /root/modify_skill_helper.py \
  --name "bond-ytm-duration" \
  --content-file /tmp/corrected_skill.md \
  --full-replace

Helper Script (Option B/C)

python3 /root/modify_skill_helper.py --help

Best Practices

  1. Prefer appending over replacing: Add a "## Correction" section at the end rather than rewriting the whole skill. This preserves history and makes your edits visible.

  2. Be specific: When appending, mention what was wrong and what the correct approach is.

  3. Include working code: If a code example was wrong, include the corrected version.

  4. Test before saving: Run the corrected code first, then save the skill.

Example: Correcting a Wrong Formula

After judge feedback: "Asset duration was computed incorrectly — you used face value instead of price as denominator"

CORRECTION='\n\n## Pitfall: Macaulay Duration Denominator\nWRONG: duration = sum(t * cf / (1+y)^t) / face_value\nCORRECT: duration = sum(t * cf / (1+y)^t) / bond_price\nThe denominator must be the current market price, not face value.'

for DIR in /root/.claude/skills /root/.terminus/skills /root/.codex/skills /root/.opencode/skill /root/.goose/skills /root/.factory/skills /root/.agents/skills /root/.gemini/skills; do
    [ -f "$DIR/bond-ytm-duration/SKILL.md" ] && printf '%s' "$CORRECTION" >> "$DIR/bond-ytm-duration/SKILL.md"
done

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/modify-skill-msh3usup/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/modify-skill-msh3usup' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/modify-skill-msh3usup/download' --output '.skill-downloads/modify-skill-msh3usup/SKILL.md.part' && mv '.skill-downloads/modify-skill-msh3usup/SKILL.md.part' '.skill-downloads/modify-skill-msh3usup/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.

Tools declared by the author (check availability in your agent): Read Write Bash

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

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/modify-skill-msh3usup/SKILL.md' && test -s '.skill-downloads/modify-skill-msh3usup/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/modify-skill' && cp -R '.skill-downloads/modify-skill-msh3usup' '.claude/skills/modify-skill'

Codex
test -f '.skill-downloads/modify-skill-msh3usup/SKILL.md' && test -s '.skill-downloads/modify-skill-msh3usup/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/modify-skill' && cp -R '.skill-downloads/modify-skill-msh3usup' '.agents/skills/modify-skill'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/modify-skill-msh3usup'

openskills read 'modify-skill-msh3usup'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

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/modify-skill-msh3usup/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