prior-work-retrieval
An agent skill by daymade, from daymade/claude-code-skills. Tags: analysis, research, reuse, review, validation.
What it does
Only for explicit prior-work/reuse/history requests; never for read-only status or inspection. Finds and verifies existing successful work before substantial new production when reuse is materially plausible. Use when the user explicitly references earlier work, existing code/SOPs, history, prior decisions, another project, or says 以前做过, 已有代码, 别重复造轮子, reuse, or retrieve before produce. A mention of current/现有 tests, README, files, implementation, behavior, or validation is not a prior-work request. Do not infer the trigger merely because new work might duplicate something. Do not invoke for current-file inspection, ordinary bug fixes, mechanical verification, or merely because the final answer is a report/summary. Produces a source-verified reuse/adapt/reject receipt; zero hits never prove absence.
Install
With the skills CLI, which installs into Claude Code, Codex, Cursor and other agents:
npx skills add daymade/claude-code-skills --skill prior-work-retrieval
Or copy the skill folder into Claude Code's skills directory by hand (~/.claude/skills for every project, or .claude/skills inside one):
git clone --depth 1 https://github.com/daymade/claude-code-skills
cp -r claude-code-skills/daymade-claude-code/prior-work-retrieval ~/.claude/skills/prior-work-retrieval
Safety box score
Grade C, moderate risk: 32 of 100 risk points, rated 2026-10-20. The grade rates what the skill and its scripts can reach on the machine of whoever installs it, across eight categories from shell execution to secrets access. How the score works.
This skill is a local prior-work retrieval workflow: it searches declared sources, writes receipts/state, and can install Claude/Codex hooks to gate future prompts. The main blast radius is on the user’s home configuration and local execution environment, not the network or external services. No credential-store access is visible in the readable files, but two core files were unreadable, so some behavior remains opaque.
| Category | Level | Why |
|---|---|---|
| Code & shell execution | 2 (moderate) | It runs Python modules and subprocesses, and the wrapper `scripts/prior-work-retrieval.sh` ends with `exec "$PYTHON_BIN" "$SCRIPT_DIR/prior_work_hook.py" "$@"`; the hook code also uses `subprocess.run(...)` in tests and command adapters. |
| Network access | 0 (none) | The readable files show local filesystem search and local command execution only; there is no code that fetches remote content or sends data to remote hosts. |
| Filesystem reach | 2 (moderate) | It reads/writes user-home paths and hook state, including `~/.cache/daymade/prior-work`, `~/.claude/hooks/prior-work-retrieval.sh`, `~/.claude/settings.json`, and `~/.codex/hooks.json`. |
| Secrets & credentials | 0 (none) | The reviewed files do not access token stores, keychains, `.env` files, browser sessions, or password material; the only sensitive-looking data handled is prompt/session metadata for receipts. |
| Privilege & persistence | 2 (moderate) | Installation mutates persistent user configuration by creating a symlink and rewriting hook settings in `~/.claude` and `~/.codex`; while it does not require sudo, it changes the agent’s trusted execution environment. |
| Instruction hijack surface | 0 (none) | The skill contains prompt-handling text and guidance, but nothing that tells the agent to ignore its rules, hide actions, or follow remote instructions; the readable code is about classification and gating, not prompt injection. |
| Irreversible actions | 1 (low) | It can automatically block substantial writes until a receipt exists and can auto-arm requirements from prompt text, but it does not push, deploy, message, pay, or delete external resources. |
| Transparency | 1 (low) | `scripts/prior_work.py` and `tests/test_prior_work_hook.py` could not be read, so the core retrieval/receipt logic is only partially inspectable. |
Before installing
- Read `scripts/prior-work-retrieval.sh` and `scripts/prior_work_hook.py`: they create `~/.claude/hooks/prior-work-retrieval.sh` and rewrite `~/.claude/settings.json` / `~/.codex/hooks.json`.
- Run `scripts/prior-work-retrieval.sh --selftest` first, and confirm it passes in a disposable account.
- Check whether you’re comfortable with persistent state under `~/.cache/daymade/prior-work` and hook-driven gating of future writes.
- Inspect the unread core module `scripts/prior_work.py` before trusting its retrieval/receipt behavior.
Rated 2026-10-20 by an automated review of 13 files from the skill's repository.
Source
- Repository
- daymade/claude-code-skills (all skills from this repository)
- Path
- daymade-claude-code/prior-work-retrieval/SKILL.md
- Branch
- main
- Updated
- 2026-09-20
Related skills
- maintain-verification-skill — Periodic pass that keeps a project's verification skill and feature map honest: parallel source readers per feature, one live session driving every feature.
- no-comments — Spawn Comment Sicko, fix accepted findings, and offer encodings for claimed constraints.
- principle-prove-it-works — Apply after completing a task, before declaring done.
- thermo-nuclear-code-quality-review — Run an extremely strict maintainability review for abstraction quality, giant files, and spaghetti-condition growth.
- verify-this — Verify a claim with fresh local evidence: restate it falsifiably, capture baseline and treatment, compare artifacts, and return VERIFIED, NOT VERIFIED.
- why — Use for 'why does X work this way', 'why we picked Y', design rationale, regressions, postmortems, or data-backed thresholds.