agentleFS
yjhqweryjhqwer/yjh-discipline/skills/prior-art-search/SKILL.md

prior-art-search

Skill1 starsChanged 2 months agoMITView on GitHub

Mandatory pre-implementation research skill. Search GitHub, official documentation, package registries, and existing battle-tested implementations before writing new features, rules files, skills, or architecture. Enforces the Adopt-Extend-Compose-Build hierarchy and delegates heavy search loops to subagents to prevent main-thread context bloat. Use before any non-trivial feature, skill, config, or library choice — and whenever an existing approach fails or survives only on a workaround and 'keep the status quo' is tempting — not for bug fixes, refactors, or mechanical changes.

8 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use deepxiv, invention-structuring 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.
  • raja21068Skill

    deepxiv

    Search and progressively read open-access academic papers through DeepXiv. Use when the user wants layered paper access, section-level reading, trending papers, or DeepXiv-backed literature retrieval.

    Also in 4 projects that use this

  • raja21068Skill

    invention-structuring

    Structure a raw invention idea into a formal invention disclosure. Use when user says \"构建发明\", \"structure invention\", \"发明构建\", \"invention disclosure\", or wants to formalize a rough idea into a patent-ready structure.

    Also in 3 projects that use this

  • Yusong-EnceladusSkill

    dse-loop

    Autonomous design space exploration loop for computer architecture and EDA. Runs a program, analyzes results, tunes parameters, and iterates until objective is met or timeout. Use when user says \"DSE\", \"design space exploration\", \"sweep parameters\", \"optimize\", \"find best config\", or wants iterative parameter tuning.

    Also in 3 projects that use this

  • +9 more from raja21068

The file

Show its rules and text

We split this skill into the rules it gives an agent

13 rules. 0 are common, 13 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 5 edited versions we read keep these.

  • 13

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before designing architecture, writing non-trivial features, creating skills, or synthesizing configurations (rules files, CI/CD, Docker), …

    line 10
  2. Distinctive:

    If an official template, high-starred repository, or standard library solves the problem, use it directly.

    line 21
  3. Distinctive:

    Do not re-implement existing standards.

    line 22
  4. Distinctive:

    If a proven solution covers ~80% of the requirements, adapt only the remaining 20% for local constraints.

    line 24
  5. Distinctive:

    If 2–3 small, maintained packages together cover the requirements better than one heavy dependency, combine them.

    line 27
  6. Distinctive:

    Only implement original logic from scratch when research proves no satisfactory prior art exists, or the problem is genuinely novel.

    line 29
  7. Distinctive:

    Query craft: search in the language of the index you are querying — for international technical content that usually means English …

    line 41
  8. Distinctive:

    If a proven approach or verdict was previously recorded, reuse it immediately — sub-second retrieval, zero network calls.

    line 45
  9. Distinctive:

    Check installed skills and active MCP servers.

    line 48
  10. Distinctive:

    Check the official ecosystem registries (npm, PyPI, crates.io, Go modules) and official vendor documentation.

    line 50
  11. Distinctive:

    Search for popular, maintained implementations, star-tested patterns, and official recipes.

    line 52
  12. Distinctive:

    Search for known pitfalls, edge cases, and post-mortems for this specific domain.

    line 53
  13. Distinctive:

    Every prior-art investigation must conclude with this concise structured format (<250 words):

    line 73

“Common” is measured: kept by at least 6 in 10 of the 5 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

Prior Art Search (Search Before Building)

The best code and configurations are the ones already battle-tested by the global community.

Before designing architecture, writing non-trivial features, creating skills, or synthesizing configurations (rules files, CI/CD, Docker), search for existing solutions first. Do not invent from imagination.

Settling counts as building. When the current approach fails, breaks something else, or survives only through manual workarounds, run this skill before recommending the user keep the status quo. "No better method exists" is a conclusion only a completed search can earn — most such conclusions come from incomplete searches. Present "do nothing" alongside the realistic alternatives and justify it with the same evidence as any other verdict.


1. The Decision Hierarchy: Adopt → Extend → Compose → Build

Assess all candidates through this strict precedence ladder:

  1. Adopt (Direct Reuse)
    • If an official template, high-starred repository, or standard library solves the problem, use it directly.
    • Do not re-implement existing standards.
  2. Extend (Adapt & Specialize)
    • If a proven solution covers ~80% of the requirements, adapt only the remaining 20% for local constraints.
    • Credit the reference pattern and document the adaptation delta.
  3. Compose (Combine Small Pieces)
    • If 2–3 small, maintained packages together cover the requirements better than one heavy dependency, combine them.
  4. Build (Novel Implementation)
    • Only implement original logic from scratch when research proves no satisfactory prior art exists, or the problem is genuinely novel.

2. Search Priority Ladder

Execute queries in this order, stopping early when a definitive solution is found:

Before any tool call: state in plain text what functionality is needed, in which language/framework, and the constraints — so the direction can be corrected early.

Do not run this skill for: bug fixes, refactoring, config-value edits, or purely mechanical changes. If the user says research is unnecessary, skipping is itself a decision — record a one-line verdict noting it was skipped at the user's request.

Query craft: search in the language of the index you are querying — for international technical content that usually means English keywords, whatever the working language is. Never translate proper nouns, product names, or technical terms: query cloudflare as cloudflare, not as its translation.

  1. Persistent memory & past decisions
    • Query your long-term memory tool or check docs/decisions/ (ADRs) first.
    • If a proven approach or verdict was previously recorded, reuse it immediately — sub-second retrieval, zero network calls.
  2. Local & installed
    • Grep the current repository for existing helper functions, patterns, or utilities.
    • Check installed skills and active MCP servers.
  3. Package registries & official standards
    • Check the official ecosystem registries (npm, PyPI, crates.io, Go modules) and official vendor documentation.
  4. Open-source prior art (GitHub / Web)
    • Search for popular, maintained implementations, star-tested patterns, and official recipes.
    • Search for known pitfalls, edge cases, and post-mortems for this specific domain.

3. Subagent Execution & Context Isolation

Never pollute the main thread with raw search queries, page dumps, or scraping results.

Quick vs Full: an obvious single lookup runs inline (Quick); anything broader delegates the sweep to a subagent (Full).

  • Delegate the sweep: spawn a disposable research subagent with the specific inquiry:
    • "Investigate existing open-source solutions, GitHub repositories, and best practices for [TASK/DOMAIN]. Identify the top 2 battle-tested approaches."
  • Disposable context: the subagent executes all multi-query searches and page fetches in its own isolated context.
  • Punch-list return: the subagent synthesizes findings and returns only the structured verdict below to the main conversation.
  • Status-first return: the report MUST open with one status line before any content: STATUS: DONE | STATUS: DONE_WITH_CONCERNS (name the doubts) | STATUS: BLOCKED (name the blocker) | STATUS: NEEDS_CONTEXT (name what is missing). A BLOCKED / NEEDS_CONTEXT subagent returns early with just the status and a one-line reason — it must not pad the report to fill the format.

4. Required Output: The Verdict Report

Every prior-art investigation must conclude with this concise structured format (<250 words):

### Prior Art Verdict

- **Status**: [DONE | DONE_WITH_CONCERNS | BLOCKED | NEEDS_CONTEXT] — first line of the report; if not DONE, follow with doubts/blocker/missing info only
- **Verdict**: [Adopt | Extend | Compose | Build]
- **Selected Reference**: [Repository / Package / Template Name] (URL or package identifier)
- **Quality Signal**: [Stars / Maintenance status / Official endorsement]
- **Adoption Strategy**:
  - If **Adopt**: direct usage instructions / dependencies to install.
  - If **Extend**: what 80% is reused, and what exact 20% must be written locally.
  - If **Build**: explicit proof of why existing solutions are unsuitable.
- **Known Pitfalls**: [Key gotchas or anti-patterns discovered during research]

One-line variant for small passes: Verdict: <Adopt|Extend|Compose|Build> — <target or "custom"> — <evidence-based reason>. A pass that searches but records no verdict line is incomplete. When the search ends in Settle (keep the status quo), the verdict needs the same rigor as a Build: name the realistic alternatives considered — including "do nothing" — and the impact of not acting.


5. Memory Write-Back (The Flywheel)

Whenever a strategic verdict is confirmed and adopted:

  • Persist the core decision to your long-term memory tool, or record a local ADR in docs/decisions/.
  • This ensures future sessions in this codebase build on past discoveries rather than repeating identical external searches.

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.