agentleFS
samwelmungasamwelmunga/jenga-npm/.agents/skills/j-skillify/SKILL.md

j.skillify

Skill0 starsChanged 21 days agoApache-2.0View on GitHub

Refactor one or more existing skills into a cleaner, more maintainable structure — extracting hardcoded content into asset files, offloading deterministic steps into scripts, and reorganizing the skill body to reflect the leaner result. Use this whenever the user wants to clean up, improve, or restructure an existing skill, mentions that a skill has hardcoded content that could be templated, or asks to "skillify", "refactor", or "tidy up" a skill. Trigger even if the user just pastes a skill and says something like "can we make this better?".

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    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:

    Read every SKILL.md the user references.

    line 30
  2. Distinctive:

    Before making changes, summarise what you found and what you propose to extract.

    line 45
  3. Distinctive:

    Write the extracted asset files with their content

    line 55
  4. Very specific:

    Write or update the bash script(s), following the structure in assets/init-new/SKILL.md

    line 56
  5. Distinctive:

    Keep narrative and conversational steps in the skill body (things Claude decides or explains)

    line 62
  6. Distinctive:

    Read these when you need a concrete example of the before/after pattern.

    line 74

≈ “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

Skillify — Refactor a Skill into a Cleaner Structure

skills/j-skillify/ is the canonical, hand-edited directory for this skill, per CLAUDE.md's "The Canonical Naming Contract" (the E50 reopening of 2026-09-09, which promoted skills/j-skillify/ from generated twin to sole canonical form). The j- prefix is there for collision safety — a real directory under a distinct name, so a host tool shipping its own same-named built-in command cannot shadow it (Claude Code's native skill resolution is a literal-string, directory-name-based match; see project/documentation/skill-authoring.md's "Invocation Convention").

⚠️ scripts/generate-j-alias.sh was retired by E50_S14 and no longer exists — there is nothing to run. This file was previously generated from a bare skills/skillify/SKILL.md source; E50_S15 deleted that directory. This file is now the sole canonical, hand-edited source for this skill — edit it directly.

What this skill does

Takes one or more existing skills and refactors them by:

  • Extracting hardcoded file content (JSON, Markdown, config, etc.) into assets/ templates
  • Extracting hardcoded directory lists into assets/ reference files
  • Moving deterministic multi-step sequences into scripts/ bash scripts
  • Rewriting the skill body to delegate to those scripts and assets, keeping instructions lean

See assets/init-old/SKILL.md and assets/init-new/SKILL.md for a concrete before/after example.


Instructions

1. Read the skill(s)

Read every SKILL.md the user references. If they also reference scripts or assets already in the skill, read those too.

2. Identify refactor opportunities

For each skill, look for:

PatternRefactor to
Hardcoded file content written inline (heredoc, echo, cat)assets/<name>_template.<ext> copied via cp
Hardcoded list of directories or pathsassets/<name>.txt read via a while read loop
Sequential deterministic steps (create files, run commands)scripts/<name>.sh executed by the skill
SCRIPT_DIR defined repeatedly across stepsDefine once at top of script

3. Confirm the plan with the user

Before making changes, summarise what you found and what you propose to extract. List:

  • Which files will move to assets/
  • Which steps will move to scripts/
  • What the updated skill body will look like

Get a thumbs-up before proceeding.

4. Produce the outputs

For each change:

  • Write the extracted asset files with their content
  • Write or update the bash script(s), following the structure in assets/init-new/SKILL.md
  • Rewrite the skill body so each offloaded step becomes a single cp or script call with a short explanation

5. Update the skill body

The rewritten SKILL.md should:

  • Keep narrative and conversational steps in the skill body (things Claude decides or explains)
  • Delegate all deterministic file/directory operations to scripts
  • Reference asset files by name so it's clear what exists where
  • Stay concise — if a step is now just "run the script", say so in one line

Reference files

  • assets/init-old/SKILL.md — The init skill before refactoring (hardcoded heredocs, inline JSON, hardcoded directory list)
  • assets/init-new/SKILL.md — The init skill after refactoring (all content in assets, steps delegated to init.sh)

Read these when you need a concrete example of the before/after pattern.

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.