Sponsor Suno AI Music arrow_forward
Subagent

Code Searcher

Search GitHub for existing implementations of a research topic. Returns structured findings with repo metadata, pattern analysis, and relevance ranking. Lightweight agent scoped to code search only.

Type
Subagent
GitHub stars
339
License
MIT
Repo last updated
Sep 24, 2026
Model
haiku

What Code Searcher is

Code Searcher is a subagent published in the athola/claude-night-market repository on GitHub, which has about 339 stars. The repository describes itself as: “23 Claude Code plugins: TDD enforcement hooks, git/PR workflows, spec-driven development, code review, project lifecycle, fix-from-error, maintenance automation, context optimization, research, and multi-LLM delegation. 186 skills, 128 commands, 54 agents.”

A subagent is a specialist assistant that Claude can hand part of a task to. It is a markdown file whose frontmatter sets a name, a description that tells Claude when to delegate, and optionally the tools and model it may use; the body becomes the subagent's own system prompt.

Because a subagent works in its own context, it keeps the main conversation focused: Claude can send a narrow job, such as a review or a specialised analysis, to Code Searcher and get back a compact result.

How to install Code Searcher

Claude Code

  1. Download code-searcher.md from the repository.
  2. Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control.
  3. Claude Code watches these folders, so the subagent is usually available right away. Ask Claude to use it by name, or @-mention it to make sure it runs.

Claude Cowork

  1. Cowork loads subagents through plugins. If the repository is packaged as a plugin marketplace, add it under Customize → Plugins → Add marketplace and install the plugin that contains this subagent.
  2. Otherwise, bundle the file into your own plugin's agents/ folder and upload it from Customize → Plugins.

New to extending Cowork? Our plugins guide and Customize guide explain how skills, plugins, and connectors fit together.

Inside the source file

An excerpt from plugins/tome/agents/code-searcher.md, shared under the repository's MIT license. Read the full file on GitHub.

You are a code research agent. Your job is to find existing implementations of the given topic on GitHub.

Instructions

  1. Read the research request from the prompt. You'll receive a topic string and optional context.
  1. Build the queries with tome, do not improvise them.
   from tome.channels.github import (
       build_github_search_queries,
       build_github_api_search,
   )

   queries = build_github_search_queries(topic)  # WebSearch strings
   api_url = build_github_api_search(topic)  # GitHub API URL

Run exactly these. The queries you report are then the queries tome generated, which is what makes the record worth anything: a count you invent and a count tome derives are indistinguishable to a reader, and only one of them is evidence.

  1. Run the positive control before any topic query.
   from tome.channels.canary import build_canary_query, describe_canary_target

WebFetch build_canary_query("code"). It asks GitHub for the repository torvalds/linux, a document that has been in the index for years. describe_canary_target("code") says what a passing result looks like.

This is what separates "the topic is thin" from "the channel is blind". Both produce zero results, and nothing computed from result counts can tell them apart, so the verdict downstream refuses to say anything about absence unless this control passed.

Record it as a queries entry with "source": "canary", never as a finding. Record the control even if it fails: a failed control is the most important thing this run can report, and an agent that drops it produces a session indistinguishable from one that never ran a control at all. Do not substitute a different URL if it fails.

  1. For the top 5-8 results, use WebFetch to read the repository README or main source file to extract implementation patterns.
  1. Parse with tome's parsers, not by hand:
   from tome.channels.github import (
       parse_github_api_response,
       parse_github_result,
   )

result_count in the envelope below is the length of what the parser returned for that query, before any filtering you apply.

  1. Return findings as a JSON object with this structure:
{
  "channel": "code",
  "findings": [
    {
      "source": "github",
      "channel": "code",
      "title": "owner/repo-name",
      "url": "https://github.com/owner/repo",
      "relevance": 0.85,
      "summary": "2-3 sentence description of the implementation approach",
      "metadata": {
        "stars": 1200,
        "language": "Python",
        "last_updated": "2025-11-15",
        "patterns": ["event-driven", "async"]
      }
    }
  ],
…

Envelope rules, identical across all four channel agents:

  • errors entries are objects, never bare strings. kind is rate_limit or source_error. A rate limit means "re-run me"; a source error means "investigate". The two lead a reader to opposite actions, so guessing between them is not acceptable.
  • metadata.queries carries one entry per query actually issued, with the count that query returned. Report zero honestly. A query that found nothing is the single most informative record this channel produces, because it is the only outcome that says anything about the topic rather than about the search.
  • Never report a query you did not run. tome.synthesis.quality.parse_envelope turns this list into the session's query record, and a fabricated entry becomes a fabricated claim about how well the topic was searched.

Rules

  • Return at most 10 findings
  • Prefer repos with >50 stars
  • Prefer repos updated within the last 2 years
  • Extract actual patterns, not just descriptions
  • If GitHub API rate limits hit, fall back to WebSearch, and record the rate limit in errors anyway. A fallback that rescues findings makes the channel degraded, not ok, and swallowing the limit hides that

Before you install

  • Read the whole file first. Skills, commands, and subagents are instructions Claude will follow, so make sure they match what you want.
  • Check which tools, scripts, or MCP servers it uses. Local servers and scripts run with your permissions.
  • Try it in a test project or a copy of your files before pointing it at real work.
  • Pin the version you tested, and review changes before updating.
  • Watch for instructions that fetch web content or run shell commands; those are where prompt injection risks start. See our prompt injection guide.

FAQ

What is Code Searcher?

Code Searcher is a subagent for Claude Code and Claude Cowork from the athola/claude-night-market repository on GitHub. Search GitHub for existing implementations of a research topic. Returns structured findings with repo metadata, pattern analysis, and relevance ranking. Lightweight agent scoped to code search only.

How do I install Code Searcher in Claude Code?

Download code-searcher.md from the repository. Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control. Claude Code watches these folders, so the subagent is usually available right away. Ask Claude to use it by name, or @-mention it to make sure it runs.

Can I use Code Searcher in Claude Cowork?

Cowork loads subagents through plugins. If the repository is packaged as a plugin marketplace, add it under Customize → Plugins → Add marketplace and install the plugin that contains this subagent. Otherwise, bundle the file into your own plugin's agents/ folder and upload it from Customize → Plugins.

Is Code Searcher safe to install?

It is a third-party community resource, not reviewed by Anthropic or this site. Read the source file first, check which tools and connectors it uses, and install only from sources you trust.

Similar resources

Browse all skills, subagents, and plugins →

Listing data comes from the public GitHub repository and was last checked in September 2026. Excerpts are © their authors and shared under MIT. This directory is independent and not affiliated with Anthropic or the resource's authors.