skillify
Convert a Claude Code conversation into a deterministic Python-scripted skill.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Convert a Claude Code conversation into a deterministic Python-scripted skill.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
| name | skillify |
| description | Convert a Claude Code conversation into a deterministic Python-scripted skill. |
| user-invocable | true |
| context | fork |
| argument-hint | ["session-uuid | \"this\""] |
| allowed-tools | ["Bash","Read","Write","Edit","Agent","AskUserQuestion"] |
| model | claude-opus-4-6 |
Convert a Claude Code conversation — where the user iterated on automating a task — into a deterministic Python-scripted skill. The goal is to capture all repeatable work in Python scripts and use AI only for error recovery and semantic summarization on future runs.
CRITICAL: Do NOT read, inspect, or browse other installed skills for "patterns", "examples", or "structure". Do NOT explore ~/.claude/skills/, list skill directories, or read any SKILL.md files other than this one. All skill structure, formatting, and generation guidance is fully defined in this procedure and in ${CLAUDE_SKILL_DIR}/prompts/generate_skill.md. There is nothing to learn from other skills that is not already specified here.
allowed-tools.python3 -c, no $(cmd) in file paths or arguments (capture to a variable first), and no # characters in quoted strings. If complex logic is needed, write it to a temporary Python script and execute that.~/.claude/ or ${CLAUDE_SKILL_DIR}/. For transient intermediate files, create an isolated workspace with mktemp -d -t {skill-name}-XXXXXXXX at the start of the procedure and clean it up with rm -rf in a final Cleanup step. Write final output to the current working directory ($PWD).Resolve the source conversation JSONL file:
python3 ${CLAUDE_SKILL_DIR}/scripts/find_session.py --mode resolve --arguments "$ARGUMENTS"
Parse the JSON output and handle based on the key present:
"path" key — session resolved. Use the path value as the JSONL file. Continue to Step 2."error" key — show the error message to the user. The message includes guidance on how to list available sessions and re-run with a UUID.Success criteria: A valid JSONL file path is identified.
Create an isolated workspace directory for this run's intermediate files:
mktemp -d -t skillify-XXXXXXXX
Capture the output path — this is the {WORKSPACE_DIR} for all intermediate files in this run.
Run the conversation parser to extract the workflow manifest:
python3 ${CLAUDE_SKILL_DIR}/scripts/parse_conversation.py "{JSONL_PATH}" > {WORKSPACE_DIR}/manifest.json
If the parser fails, show the error and stop.
Read {WORKSPACE_DIR}/manifest.json to get the full manifest.
Success criteria: Manifest JSON is valid and contains at least 1 tool call.
Present the manifest summary to the user:
Then conduct a MANDATORY interview via AskUserQuestion. Do NOT skip this step. Do NOT proceed to Step 4 without completing Round 1. Every question below MUST be asked and answered before continuing.
Round 1 (REQUIRED): Ask all of these in a single AskUserQuestion with multiple questions:
~/.claude/ — writes there trigger sensitive-file permission prompts.
$PWD/{name}/). A symlink to ~/.claude/skills/{name} will be created in the final step for discovery.Success criteria: Skill name, description, save location, and workflow steps are confirmed.
Check the manifest's written_files for any Python scripts or SKILL.md files that were already created during the source conversation.
If existing scripts are found:
If using existing scripts, read their full content for passing to the generation agent.
Success criteria: Decision made on whether to reuse or regenerate scripts.
Read the agent prompt template:
${CLAUDE_SKILL_DIR}/prompts/generate_skill.md
Substitute the placeholders:
{WORKFLOW_MANIFEST} — the full manifest JSON from Step 2{SKILL_NAME} — the confirmed skill name from Step 3{SAVE_LOCATION} — the confirmed save path from Step 3{CORRECTIONS} — the corrections array from the manifest (or "None detected" if empty){EXISTING_SCRIPTS} — content of existing scripts from Step 4 (or "None — generate from scratch" if regenerating){TOOL_DEPENDENCIES} — list of MCP servers and CLI tools the workflow requires{PRECONDITIONS} — from Round 2 interview (or "None specified"){IDEMPOTENCY} — from Round 2 interview (or "Not specified"){ESCALATION_RULES} — from Round 2 interview (or "Default: stop and ask on any error")Launch an Agent with the substituted prompt. The Agent will output file contents in clearly marked ## FILE: sections.
Save the Agent's output to {WORKSPACE_DIR}/agent-output.txt, then parse it deterministically:
python3 ${CLAUDE_SKILL_DIR}/scripts/parse_agent_output.py {WORKSPACE_DIR}/agent-output.txt > {WORKSPACE_DIR}/files.json
Read {WORKSPACE_DIR}/files.json to get the list of files.
Success criteria: Parser extracts at least SKILL.md and one Python script.
Present a summary of what will be written. For each file from the parsed output, show:
{SAVE_LOCATION}/{relative_path}Then use AskUserQuestion:
If the user chooses "Abort", stop and report that no files were written. If the user chooses "Write with changes", ask what to change, apply modifications, then proceed to Step 6.
Success criteria: User has confirmed the files to write.
Create the skill directory structure and write each file from the confirmed file list to its correct location. Ensure {SAVE_LOCATION}/scripts/ exists.
Validate the generated skill:
python3 ${CLAUDE_SKILL_DIR}/scripts/validate_skill.py "{SAVE_LOCATION}"
Parse the JSON output. If valid is false, fix the errors listed in the errors array and re-validate.
If either validation fails, fix the syntax error and re-validate.
Success criteria: All files written, Python parses cleanly, frontmatter is valid.
Tell the user:
ln -sf {SAVE_LOCATION} ~/.claude/skills/{SKILL_NAME}
If {SAVE_LOCATION} is already inside .claude/skills/, skip the symlink — it is discovered automatically./{SKILL_NAME} or /{SKILL_NAME} [arguments]Success criteria: User has all information needed to use the new skill.
Remove the workspace directory used for intermediate files:
rm -rf {WORKSPACE_DIR}