원클릭으로
ratchet-wisdom-curate
Curate a wisdom-backed workflow from the local PCR store, install local skills, and optionally run the task.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Curate a wisdom-backed workflow from the local PCR store, install local skills, and optionally run the task.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Collect Ratchet local pipeline debug evidence. Use when a run is failed, stuck, stale, stopped, missing outputs, has confusing LLM behavior, or needs local evidence from pipeline traces, events.jsonl, worker.log, raw LLM artifacts, and a debug bundle directory.
Show local Ratchet setup status and optional host-agent configuration.
Evaluate and enhance a ratchet skill using LLM-as-judge A/B testing with an iterative improvement loop.
Run the Ratchet skill extraction pipeline to analyze project sessions and generate reusable skills and strategies.
Show Ratchet help — available commands, output locations, skill and strategy structure, and usage tips.
View or update your Ratchet developer profile (language, level, style) to personalise skill extraction.
| name | ratchet-wisdom-curate |
| description | Curate a wisdom-backed workflow from the local PCR store, install local skills, and optionally run the task. |
| argument-hint | <problem description> |
| allowed-tools | Bash, Read, Write, Glob, AskUserQuestion |
Retrieve relevant wisdoms from the local knowledge store, curate them into a step-by-step workflow, install recommended skills, and optionally execute the task.
RATCHET_DIR="${RATCHET_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-${CODEX_PLUGIN_ROOT:-$(cat ~/.local/ratchet/plugin-root 2>/dev/null)}}}"
set -a && . "$RATCHET_DIR/.env" 2>/dev/null && set +a
uv run --directory "$RATCHET_DIR" python -m ratchet.client.check_auth
If the auth check fails (non-zero exit), show the output to the user and stop.
The ratchet data directory is returned by ratchet.client.dirs.data_dir().
Use this function to resolve the path — never hardcode it.
Skills and curations are stored under this directory:
{data_dir()}/skills/{skill-name}/ ← installed skill directories
SKILL.md ← main skill file
scripts/ ← optional
references/ ← optional
{data_dir()}/curations/pending/ ← curated, not yet executed
{session_id}.json
{data_dir()}/curations/running/ ← currently executing
{session_id}.json
{data_dir()}/curations/completed/ ← finished
{session_id}.json
Each curation JSON contains: session_id, query, curation (markdown workflow),
skills (list of local {name, path, url} references), wisdoms, token_count,
cost_usd, created_at, status.
Key Python functions for skill/curation access:
ratchet.client.dirs.data_dir() → data root pathratchet.client.skill_installer.skills_dir() → skills directoryratchet.client.skill_installer.install_skills(skills) → download + extractratchet.client.curation_store.save_curation(result) → save to pending/ratchet.client.curation_store.get_curation(session_id) → load by IDratchet.client.curation_store.list_curations(status) → list by statusratchet.client.curation_store.update_curation_status(id, status) → transitionIf $ARGUMENTS is empty or blank, use AskUserQuestion to ask the user
what task or skill they need help with. Do NOT proceed until the user
provides a non-empty task description. Store the answer as TASK_QUERY.
If $ARGUMENTS is provided, set TASK_QUERY to $ARGUMENTS and proceed.
SESSION_ID="${CLAUDE_SESSION_ID:-$(uuidgen 2>/dev/null || python3 -c 'import uuid;print(uuid.uuid4())')}"
echo "SESSION_ID=$SESSION_ID"
Remember this SESSION_ID — you will need it for feedback.
Identify the project's tech stack using your own knowledge. Do NOT use a script.
Store the result in TASK_CONTEXT (separate from TASK_QUERY).
Use Glob to find manifest/config files in the project root:
Glob("*") in the current working directory
Look for any recognizable manifest — package.json, pyproject.toml, go.mod, Cargo.toml, pom.xml, build.gradle, Gemfile, composer.json, *.csproj, etc. This is not an exhaustive list — recognize any manifest you encounter.
Read the first manifest file found (limit to 50 lines). From its contents,
determine the primary language, version (if visible), and key frameworks/libraries.
Compose TASK_CONTEXT as a descriptive sentence:
Python 3.12 project using FastAPI, SQLAlchemy, CeleryTypeScript project using Next.js 14, Prisma, TailwindCSSGo 1.22 project using Gin, GORMJava 21 Maven project using Spring Boot 3, JPARust project using Axum, Tokio, SQLxRuby project using Rails 7, SidekiqPython projectTASK_CONTEXT empty.Show a brief acknowledgment to the user:
Analyzing task... Curating skills...
IMPORTANT: Do NOT add any echo statements to this command.
The CLI prints JSON to stdout — any extra output will corrupt the JSON.
If TASK_CONTEXT is not empty, format the query as:
Task: <TASK_QUERY>, Task Context: <TASK_CONTEXT>
If TASK_CONTEXT is empty, use TASK_QUERY as-is.
uv run --directory "$RATCHET_DIR" ratchet wisdom-curate \
"$FORMATTED_QUERY" \
--session-id "$SESSION_ID"
Where FORMATTED_QUERY is the value you composed above.
Parse the JSON output and store:
curation: Markdown curation document (step-by-step workflow).skills: List of skill references, each with name, path, url.wisdoms: Underlying wisdom records.operator_plan: Ordered operator execution-assist plan.readiness_summary: Counts of ready vs blocked operators.Parse the curation field and present a structured summary:
Workflow: <title>
Overview: <1-2 sentence summary>
Readiness: <N ready>, <M blocked>
Steps:
1. <step title> — Skill: <skill-name> [ready|blocked]
2. <step title> — Skill: <skill-name> [ready|blocked]
3. <step title> — (no skill reference) [ready|blocked]
For blocked steps, include:
- Missing preconditions
- Missing slots
- Conflicts
N skills recommended for this workflow.
Check which skills are already installed:
ls "$(uv run --directory "$RATCHET_DIR" python -c "from ratchet.client.skill_installer import skills_dir; print(skills_dir())")" 2>/dev/null || echo "(no skills installed)"
IMPORTANT — BINARY INSTALL DECISION: There are EXACTLY two outcomes.
Do NOT offer partial, selective, or subset installation in any form.
Show all skills with their status, then use AskUserQuestion to ask:
The following skills are recommended for this workflow:
1. python-pro — [Already installed]
2. fastapi — [Not installed]
3. d3-visualization — [Not installed]
Would you like to install the 2 new skills? (Yes / Skip)
For each not-yet-installed skill, install from the local source path returned
by wisdom-curate:
Write the JSON array of not-yet-installed skills from Step 3 to a temp file, then pass the file path to the installer:
SKILLS_JSON_FILE="$(mktemp)"
cat > "$SKILLS_JSON_FILE" << 'SKILLS_EOF'
<JSON array of not-yet-installed skills from Step 3>
SKILLS_EOF
uv run --directory "$RATCHET_DIR" python -c "
from ratchet.client.skill_installer import install_skills
from ratchet.client.api.protocol import SkillRefItem
import json, sys, os
skills = [SkillRefItem(**s) for s in json.loads(open(sys.argv[1]).read())]
os.unlink(sys.argv[1])
results = install_skills(skills)
for name, status in results.items():
print(f'{name}: {status}')
" "$SKILLS_JSON_FILE"
Skills are copied to {data_dir()}/skills/{skill-name}/.
Report per-skill status:
Installed: fastapi ✓
Installed: d3-visualization ✓
Skipped: python-pro (already installed)
Save the curate result for potential later resumption:
Write the full curate result JSON from Step 3 to a temp file, then pass the file path:
CURATE_JSON_FILE="$(mktemp)"
cat > "$CURATE_JSON_FILE" << 'CURATE_EOF'
<full curate result JSON from Step 3>
CURATE_EOF
uv run --directory "$RATCHET_DIR" python -c "
from ratchet.client.curation_store import save_curation
from ratchet.client.api.protocol import WisdomCurateResult
import json, sys, os
result = WisdomCurateResult(**json.loads(open(sys.argv[1]).read()))
os.unlink(sys.argv[1])
path = save_curation(result)
print(f'Saved: {path}')
" "$CURATE_JSON_FILE"
Use AskUserQuestion to present the run decision:
Your task is ready to run. Would you like to:
- Run now — execute the workflow with the installed skills
- Later — end here, you can use the skills manually later
If the user chooses Run now:
Update curation status:
uv run --directory "$RATCHET_DIR" python -c "
import sys
from ratchet.client.curation_store import update_curation_status
update_curation_status(sys.argv[1], 'running')
" "$SESSION_ID"
Follow the curation workflow. For each step:
When a step references a skill, read it from the installed skills directory:
Read("{data_dir()}/skills/{skill-name}/SKILL.md")
For specific sections referenced in the curation:
Reference: `python-pro/SKILL.md#Type Hints L42-78`
→ Read("{data_dir()}/skills/python-pro/SKILL.md", offset=42, limit=37)
After the workflow completes, mark as completed:
uv run --directory "$RATCHET_DIR" python -c "
import sys
from ratchet.client.curation_store import update_curation_status
update_curation_status(sys.argv[1], 'completed')
" "$SESSION_ID"
Proceed to Feedback.
If the user chooses Later:
Show a brief summary:
Skills installed: python-pro, fastapi
Curation saved to: {data_dir()}/curations/pending/{SESSION_ID}.json
You can resume this workflow later by asking me to continue it.
Proceed to Feedback with abbreviated feedback.
You MUST complete this step. Do NOT skip it.
Use the same SESSION_ID from Step 2.
Evaluate how useful the curation was by writing natural language feedback covering these 6 required fields:
Provide curation-quality feedback only:
uv run --directory "$RATCHET_DIR" ratchet wisdom-feedback \
--session-id "$SESSION_ID" \
--feedback-text "
Overall: <rating>/5. <impact estimates>
Step 1 (<step name>): <rating>/5
- <wisdom/item>: <applied|partial|not used>. <effect estimate>.
Missing: <what knowledge was needed but not provided>
Unexpected: <any surprises>
Recommendations:
- <per-item improvement suggestions>
"