cp-skill-revise-iterative

Solid

Iteratively revise a note for flow, readability, and cohesion using non-interactive Claude calls. Each pass produces a numbered copy; the outer agent reviews for semantic fidelity and significance before continuing. Triggers on "/cp-skill-revise-iterative [note]".

AI & Automation 69 stars 9 forks Updated today CC-BY-4.0

Install

View on GitHub

Quality Score: 88/100

Stars 20%
61
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

## EXECUTE NOW **Target: $ARGUMENTS** (exactly one note path or filename — if empty, ask which note) ### Step 0: Resolve the file Resolve `$ARGUMENTS` to a full path. If it's a bare filename, search `kb/notes/` for a match. Read the file to confirm it exists and capture the original content. ### Step 1: Initialize ``` i=0 source_file=<resolved path> ``` Copy the original to `${source_file}.0` — this is the baseline for the first revision pass. ### Step 2: Revision loop Run the following loop. **Max iterations: 5** (hard cap to prevent runaway). #### 2a. Run non-interactive revision ```bash claude -p "Revise $(basename ${source_file}).$i for flow, readability, and cohesion. Preserve all semantic content, claims, and structure. You MAY improve the title (# heading) and description frontmatter field if you see a clear improvement — but do not change tags, type, status, or traits. Focus on: sentence-level clarity, paragraph transitions, removing filler, tightening prose." \ --allowedTools "Read,Edit,Write" \ --max-turns 10 ``` Run this from the directory containing the file so relative paths work. #### 2b. Verify the revision happened Read `${source_file}.$i` after the claude call. If the file is unchanged from before the call (content identical to pre-call state), the revision failed — report the failure and bail out. Do not increment or retry. #### 2c. Semantic fidelity check Compare `${source_file}.$i` (revised) against the previous version (`${source_file}....

Details

Author
zby
Repository
zby/commonplace
Created
3 months ago
Last Updated
today
Language
Python
License
CC-BY-4.0

Similar Skills

Semantically similar based on skill content — not just same category