← ClaudeAtlas

lift-to-shared-ruleslisted

Persist a generalizable coding pattern, constraint, or convention into the shared rules repo — pick the category, write and anonymize the rule, check coherence against every existing rule, show the diff with a filled-in acceptance checklist, commit locally, then stop — the push (owner) or PR (contributor) happens only on a separate explicit go. Invoke whenever a pattern emerges that should apply across all projects, not just the current one.
artemisia-absynthium/ai-guidelines-sync · ★ 3 · Code & Development · score 66
Install: claude install-skill artemisia-absynthium/ai-guidelines-sync
# lift-to-shared-rules Persist a generalizable coding pattern into the shared rules repo, verify coherence across all existing rules, show the diff with a filled-in acceptance checklist, commit locally on confirmation, and push (owner) or open the PR (contributor) only on a separate explicit go — the repo is public, so nothing leaves the machine without the user's word. Invoke this skill whenever a pattern, constraint, or convention emerges that should apply across all projects, not just the current one. ## Step 0 — Detect mode Run the following checks and set mode before doing anything else: ```bash echo "${CLAUDE_SETUP_PATH:-UNSET}" [[ -n "$CLAUDE_SETUP_PATH" && -d "$CLAUDE_SETUP_PATH/.git" ]] && echo "DIR: OK" || echo "DIR: MISSING" git -C "$CLAUDE_SETUP_PATH" remote -v 2>/dev/null | head -4 git -C "$CLAUDE_SETUP_PATH" push --dry-run 2>&1 | tail -1 ``` - **Owner mode**: `CLAUDE_SETUP_PATH` is set, the directory exists, and the dry-run push succeeds (exit 0 / "Everything up-to-date"). Work is done directly in `$CLAUDE_SETUP_PATH`. - **Contributor mode**: any condition fails — env var unset, directory missing, or dry-run push is rejected. State which condition triggered contributor mode, then proceed with the fork/PR flow (Step 7b). Do not use `gh api` to check push permission — it reads the permission field for the authenticated `gh` account, which may differ from the SSH identity used by the repo's git remote. ## Step 1 — Identify target Determine the category and