agentleFS
oprogramadorrealoprogramadorreal/optimus-claude/skills/reset/SKILL.md

reset

Skill75 starsChanged 2 months agoMITView on GitHub

Removes selected init and permissions setup from the project, or only the permissions setup with the permissions argument. Reviews ownership, current content, and Git recoverability; preserves ambiguous user content and backs up selected changes when needed. Requires a concrete deletion selection. Tests are never touched. Monorepo and multi-repo aware.

16 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use daily-arxiv, exp-eval and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • LambenthanSkill

    daily-arxiv

    每日从 arXiv 拉取新论文,过滤相关性,auto-ingest 高优先级论文,检测 SOTA 更新

    Also in 5 projects that use this

  • LambenthanSkill

    exp-eval

    实验判决门:Review LLM 独立评判实验结果 → 4 种判决路径 → 自动更新 claims confidence、ideas status、graph edges

    Also in 5 projects that use this

  • skyllwtSkill

    exp-pilot-eval

    Pilot result evaluation — read pilot results, apply success criteria, update idea page (pilot_result, failure_reason if failed), generate PILOT_VERDICT_REPORT. Called by /ideate Phase 5 after /exp-pilot-run.

    Also in 4 projects that use this

  • skyllwtSkill

    exp-pilot-run

    Pilot experiment execution — read Pilot Spec YAML, write pilot code, run experiment(Confirm with the user before operation and require the applicant to conduct manual inspection), return results. Called by /ideate Phase 5. Does NOT modify wiki pages or judge pass/fail.

    Also in 4 projects that use this

  • phanghonghaoSkill

    poster

    HTML/CSS A4 海报生成。从沙龙/活动 Markdown 文件生成科技风 A4 海报 PDF/PNG。Use when user mentions: poster, 海报, 海报生成, make poster, generate poster, 活动海报, 沙龙海报.

    Also in 4 projects that use this

  • +6 more from Lambenthan
  • +1 more from skyllwt

The file

We split this skill into the rules it gives an agent

8 rules. 0 are common, 5 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 13 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Remove selected project artifacts, not the plugin installation itself.

    line 9
  2. Distinctive:

    Never touch tests, test directories, or test configuration, even if Optimus created them.

    line 19
  3. Very specific:

    If git rev-parse --is-inside-work-tree returns true, resolve git rev-parse --show-toplevel (including linked worktrees).

    line 26
  4. Very specific:

    Read $CLAUDE_PLUGIN_ROOT/skills/init/references/managed-files.md and any .claude/.optimus-managed.json.

    line 28
  5. Distinctive:

    No in-scope candidates, including stale ownership entries → report nothing to reset and stop, even if init artifacts or unrelated settings …

    line 42
  6. Distinctive:

    Delete only the selected files whose recovery/backup checks passed.

    line 80
  7. Distinctive:

    Remove only managed directories made empty by this run, within the checked roots and chosen scope.

    line 87
  8. Very specific:

    After a permissions-only reset, report any retained init setup.

    line 91

“Common” is measured: kept by at least 6 in 10 of the 13 edited versions of this file we could read. “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

Reset — Remove optimus-generated files

Remove selected project artifacts, not the plugin installation itself.

Scope

Parse $ARGUMENTS before inventorying: empty → the existing full inventory; permissions → only the permissions setup. Any other argument → show usage /optimus:reset [permissions] and stop without changes. Keep every later selection, edit, and cleanup within the chosen scope.

The permissions scope removes Claude Code configuration from either host; it does not configure Codex permissions. It removes additions, without restoring previously replaced hook contents or git deny rules removed during setup: the ownership record contains no such history.

Safety Rules

  • Never touch tests, test directories, or test configuration, even if Optimus created them.
  • Stay within .claude/, subproject CLAUDE.md/docs/, workspace-root CLAUDE.md, and marked optimus:pointer blocks in root AGENTS.md. Resolve every target inside the intended root; do not follow symlinks outside it.
  • .claude/settings.json is merged surgically. Filename, matching permission values, Git tracking, and template-like headings do not prove ownership or current-byte recoverability.
  • Preserve .claude/.optimus-reset-backups/ from this and earlier runs; never include it in the removal inventory.

Step 1 — Detect and inventory

If git rev-parse --is-inside-work-tree returns true, resolve git rev-parse --show-toplevel (including linked worktrees). Otherwise apply $CLAUDE_PLUGIN_ROOT/skills/init/references/multi-repo-detection.md. Process each child repo independently; include workspace-root context files only when applicable.

Read $CLAUDE_PLUGIN_ROOT/skills/init/references/managed-files.md and any .claude/.optimus-managed.json.

permissions scope: inventory only .claude/hooks/restrict-paths.sh, its hooks.PreToolUse registrations, and recorded permissions.allow / permissions.deny additions (including recorded MCP allowances). Include their ownership entries even when the hook or settings additions are already missing. Shared settings and ownership files are entry-edit targets, not whole-file candidates. Preserve unrelated hook commands in shared matcher groups. Unrecorded permission rules stay unless the user identifies the exact entries for review; template equality or current MCP names never establish ownership. Do not inventory init's docs, formatters, pointers, or .optimus-version.

Full scope only: inventory existing candidates:

  • .claude/CLAUDE.md, .claude/.optimus-version, .claude/settings.json, and the ownership record.
  • .claude/docs/{coding-guidelines,testing,styling,architecture,skill-writing-guidelines}.md.
  • .claude/hooks/format-*, including retired format-python.py and format-node.js, and .claude/hooks/restrict-paths.sh.
  • Legacy .claude/agents/{code-simplifier,test-guardian}.md.
  • Root AGENTS.md only when it contains a well-formed optimus:pointer block.
  • Monorepo: applicable subproject CLAUDE.md and docs/{coding-guidelines,testing,styling,architecture}.md.
  • Multi-repo: the above per child repo, plus workspace-root CLAUDE.md and pointer block.

No in-scope candidates, including stale ownership entries → report nothing to reset and stop, even if init artifacts or unrelated settings remain. Missing provenance means an older or unrelated installation, not permission to delete every candidate.

Step 2 — Classify content and recoverability

Show two independent dimensions for each candidate:

Content / ownershipMeaning
UNMODIFIEDCRLF-normalized current SHA-256 matches a valid recorded file entry's sha256. Show whether that baseline is a template or an approved customization (refresh: "review").
MODIFIEDRecorded file differs from its entry's sha256. Read it before proposing removal.
UNKNOWNNo usable record; may be legacy Optimus content or independently authored.
COMPLEXShared settings.json, AGENTS.md, or ownership record; propose exact entry/block edits.

For UNKNOWN legacy files, compare against current templates to inform the plan. An existing user file stays UNKNOWN after ordinary init edits; only explicit whole-file adoption/replacement establishes ownership. Verbatim hook equality or coding-guide equality apart from the project heading is useful evidence, but do not promote unknown ownership to recorded ownership. Generated-document headings and identity comments can suggest LIKELY_GENERATED; this is an annotation under UNKNOWN, not proof that the prose is unchanged. Retired hooks remain UNKNOWN unless provenance establishes them; their names alone do not authorize deletion.

Check HEAD, index, and working tree separately: use Git status/diffs for each path, and verify whether its current bytes equal a version in HEAD or the index. Report clean recorded version, staged changes, unstaged changes, or untracked. A tracked file with new edits is not wholly recoverable through checkout. Git errors mean recovery is unverified. Do not stage, restore, reset, or commit files during this check.

Read shared settings and show every proposed removal. Recorded additions may be removed only if they still exactly match; changed/unrecorded rules and groups stay unless the user explicitly selects those particular entries. Existing MCP names and today's permission template do not establish who added a rule. Retained hook files keep their registrations.

Step 3 — Present a concrete deletion plan

List the chosen scope, file paths, ownership/content class, Git state, and exact settings/pointer edits, grouped by repo. Include proposed removal of stale in-scope ownership entries after verifying the corresponding file/setting is absent. Explain that legacy template drift and user edits cannot always be distinguished. Name selected content needing a local backup, since Git cannot recover those current bytes.

AskUserQuestion — header "Reset", question "Which parts of this reset plan should be applied?":

  1. Unmodified only (Recommended) — remove recorded unchanged files and their unchanged recorded settings additions; keep MODIFIED and UNKNOWN content.
  2. Select files and entries — identify exact candidates to remove, including any legacy files or shared settings entries.
  3. Remove all listed candidates — explicitly includes modified/unknown files and only the settings edits shown in the plan; preserve backups and unrelated settings.
  4. Abort — change nothing.

Existing explicit authorization for this exact displayed plan is sufficient. Do not infer approval to remove ambiguous settings from a general "Unmodified only" selection.

Step 4 — Preserve current bytes and execute

Before changing a selected file whose current bytes are not verified recoverable from HEAD/index (including shared files about to be edited), make a byte-for-byte backup. Use a new timestamped directory under .claude/.optimus-reset-backups/, with original relative paths and an index of source paths. Create its local .gitignore containing * before copying. Inside a Git working tree, verify each backup path is untracked and ignored with Git. For a confirmed non-Git workspace root, verify the backup stays outside every child repository; the local ignore file also protects it if that workspace later becomes a repository. Never put secrets into a tracked backup or stage the backups. If repository status is uncertain, ignore/path verification fails, or copying fails, keep the affected originals and report the limitation instead of deleting them. Explain where local backups remain and that they may contain private settings; do not print their contents.

Compare each backup's hash to its original before proceeding. Recheck the original's hash immediately before deletion; if it changed since the approved plan, preserve it and obtain an updated selection. Clean recorded files do not need redundant backups.

  1. Delete only the selected files whose recovery/backup checks passed. Do not recursively remove directories.
  2. Apply only the settings edits shown and selected. Remove a recorded hook matcher group only when it still exactly matches and its referenced Optimus hook was deleted or already missing. Preserve groups containing retained hooks and all unrecorded/changed groups unless separately selected. Remove exact recorded permission additions only; never infer ownership from .mcp.json. Prune containers that became empty through these removals, preserving preexisting empty/custom sections; delete settings.json only when the approved edit leaves no content.
  3. For selected root AGENTS.md pointers, remove only the complete marked block. Preserve every surrounding byte; delete the file only if it consisted entirely of that block. Malformed/multiple ambiguous markers need a concrete reviewed edit, not a broad regex deletion.
  4. Update the ownership record to remove only completed removals and selected in-scope entries whose file/setting is verified absent; retain entries for kept files/settings. Remove the record only when empty and selected. In permissions scope, always preserve .optimus-version and init's records. In full scope, keep .optimus-version if the selected reset left managed artifacts in place; report that a later init is still needed to reconcile them.

Step 5 — Clean up and report

Remove only managed directories made empty by this run, within the checked roots and chosen scope. Preserve backup directories and all unrelated files.

Report removed/kept paths with reasons, settings changes, and any backup/recovery locations. Explicitly note retained hook registrations and unresolved legacy ownership. A partial reset is reported as partial, not successful removal of everything.

After a permissions-only reset, report any retained init setup; if reinstalling, use /optimus:permissions in a fresh Claude Code conversation. Stop without recommending init or plugin uninstallation for this scope.

After a full-scope reset, recommend reinstalling in a fresh conversation using the current host: Claude Code → /optimus:init (plus /optimus:permissions); Codex → $optimus:init only, since permissions is Claude-only. To uninstall the plugin itself, give the host's command: Claude Code → /plugin uninstall optimus@optimus-claude; Codex CLI → codex plugin remove optimus@optimus-claude in the terminal. Do not execute plugin uninstallation as part of reset.

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.