Search Context logo

Search Context

Organization
instructa
search-context

Find, clone, inspect, and summarize high-quality GitHub reference repositories for coding agents. Use when a user asks for GitHub reference projects, examples, prior art, inspiration, implementation patterns, or includes "$search-context" in a coding prompt.

Overview

Publisherinstructa
Repositoryagent-skills
Skill namesearch-context
Stars
141
Forks
16
Bundled files
12
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 12 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by instructa on GitHub. Read the source before you install it.

Installation

Install the Search Context AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/instructa/agent-skills.git /tmp/agent-skills
mkdir -p .claude/skills
cp -r /tmp/agent-skills/skills/engineering/search-context .claude/skills/search-context
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Search Context in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Search Context on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Search Context is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Search Context

Use this skill when the user wants an agent to find useful GitHub reference projects for a feature, UI pattern, implementation pattern, platform, framework, or library.

Trigger examples:

  • $search-context visual progress indicator ring for ios app latest 2026
  • find GitHub references for a SwiftUI circular progress ring
  • how do good projects implement this pattern?
  • clone a few reference repos and tell me which files to inspect
  • give this agent GitHub context before implementing the feature

The goal is not faster raw code search. The goal is better reference selection, fewer cloned repositories, less context noise, and a clean manifest that tells the coding agent what to inspect.

Default workflow

  1. Convert the user request into concise GitHub search phrases. For broad app/product requests, split the request into stack, domain, and pattern facets instead of running one overloaded query.
  2. If the user asks for local/third-party references, search the local reference library first.
  3. Use GitHub repository discovery for fresh references, not GitHub code search.
  4. Prefer recent, maintained, readable repositories.
  5. Clone only the top candidate pool using blobless shallow clone.
  6. Inspect local and cloned repositories with rg.
  7. Verify candidates with local proof terms and reject generic/noisy references.
  8. Write a compact Markdown reference manifest with rejected/noisy references.
  9. Tell the agent which files are worth reading and why.

Required local tools

This skill expects these tools to be available in the shell:

  • gh, authenticated with GitHub
  • git
  • rg, also known as ripgrep
  • node version 18 or newer

Before running a search, use:

bash
node scripts/search-context.mjs check

Main command

From the skill directory:

bash
node scripts/search-context.mjs run "visual progress indicator ring for ios app latest 2026" \
  --preset ios-swift \
  --max-repos 5

If the package has been linked with npm link, use:

bash
search-context run "visual progress indicator ring for ios app latest 2026" --preset ios-swift

Presets

Use a preset when the platform or stack is clear.

  • ios-swift: iOS, Swift, SwiftUI, UIKit, Apple UI components.
  • web-react: React, Next.js, Vite, Tailwind, component patterns.
  • generic: fallback when the stack is unknown.

The preset controls GitHub language filters, query expansion, local rg terms, file globs, and scoring hints. Presets are hints, not the whole plan: broad requests should still be decomposed into narrower searches such as framework architecture, domain examples, and UI/workflow patterns.

Local reference library

Use the local library for existing third-party folders or previously curated references:

bash
node scripts/search-context.mjs library add ../third-party/some-repo --tags react,ui --presets web-react --project current
node scripts/search-context.mjs library search "ProgressRing"
node scripts/search-context.mjs run "React progress ring" --sources library,github --project current

Library metadata is stored in the OS user cache at <cache>/library/repositories.json. Project-specific clusters are stored in the same registry when --project current or --project <id> is used.

Keep FFF or any future long-lived index as an optional search backend under this library workflow. Do not make FFF a hard requirement and do not split this into a separate skill unless the goal changes from reference selection to general code search.

Clone policy

Use blobless shallow clones for reference repositories:

bash
git clone --depth=1 --filter=blob:none --single-branch --no-tags <repo-url> <user-cache>/search-context/refs/owner__repo

Do not use normal full clones by default. Do not clone more than 5 repositories unless the user explicitly asks. Do not install dependencies from cloned reference repos. Do not execute cloned project code. Do not copy large code blocks into the agent context.

By default, keep cloned repositories and manifests in the OS user cache, not in the current project. Use --project-local only when the user explicitly wants .refs/ and .context/ in the current directory. Inside a Git worktree, those project-local paths must be ignored or the CLI will refuse to write them.

Search policy

Use repository discovery first. Avoid using gh search code as the primary source. Use local rg after cloning to verify that the repository actually contains relevant implementation files. GitHub Code Search can be used as an optional pre-clone proof gate, but do not depend on it by default because the API is rate-limited.

Good reference selection beats raw search speed.

For mixed requests, prefer several narrow repository searches over one broad query. Example: "habit life app with TanStack Start" should produce stack queries like tanstack start, domain queries like habit life, and pattern queries like habit life tanstack start. Do not let a general React preset drown the run in unrelated component libraries.

Proof gates should reject or down-rank candidates that only match generic terms like react, start, or full. For known stacks/domains, require concrete code proof where possible:

  • TanStack Start: @tanstack/react-start, createServerFn, StartServer, StartClient, routeTree.gen, vinxi.
  • Habit apps: habit, streak, completion, calendar, routine.
  • Noise: raw GitHub zip links, default secrets, and README-only bait.

Score repositories by:

  • intent match
  • language and stack match
  • recent pushed_at
  • not archived
  • not a fork unless explicitly useful
  • readable size
  • license presence
  • examples, demos, samples, or preview apps
  • local matches in relevant implementation files

Output contract

Always produce a Markdown manifest. The default output is:

text
<user-cache>/search-context/runs/<timestamp>/reference-context.md

The manifest must include:

  • user goal
  • preset used
  • search plan mode and facets, when generated
  • GitHub search phrases used
  • top reference repositories
  • why each repository is useful
  • local path for each cloned repository
  • relevant files with short snippets only
  • rejected references with short reasons
  • what to study
  • what not to copy
  • any failures or uncertainty

Do not dump full repositories or long file contents into the response.

Recommended agent behavior after the manifest

After the manifest is written, the coding agent should:

  1. Open only the relevant files listed in the manifest.
  2. Study implementation patterns, API choices, animation structure, state handling, and styling.
  3. Adapt the pattern to the current project.
  4. Respect licensing and avoid copying large sections of code.
  5. Implement the requested feature in the user's project.
  6. Run tests or build checks if available.

Useful commands

Run a reference search:

bash
node scripts/search-context.mjs run "SwiftUI progress ring animation" --preset ios-swift

Preview searches without cloning:

bash
node scripts/search-context.mjs run "SwiftUI progress ring animation" --preset ios-swift --dry-run

Use SSH for cloning:

bash
node scripts/search-context.mjs run "SwiftUI progress ring animation" --preset ios-swift --ssh

Search the local reference library:

bash
node scripts/search-context.mjs library search "Circle().trim"

Clean cached reference repos older than 30 days:

bash
node scripts/search-context.mjs clean --older-than 30d

Safety and licensing

Treat cloned repositories as untrusted code. Never run project scripts, package managers, tests, binaries, or install commands inside a reference repository unless the user explicitly asks and the risk is understood. Use reference repos for ideas, structure, and comparison, not for blind copying. Surface license information in the manifest when available.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Search Context AI skill do?

Find, clone, inspect, and summarize high-quality GitHub reference repositories for coding agents. Use when a user asks for GitHub reference projects, examples, prior art, inspiration, implementation patterns, or includes "$search-context" in a coding prompt.

Why use Search Context on TypingMind?

Because you install it once and use it with any model. Search Context is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Search Context in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/instructa/agent-skills/tree/main/skills/engineering/search-context. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Search Context?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Search Context?

As many as you like. As long as a model supports skills, you can use Search Context with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Search Context AI skill free?

Yes. It is published on GitHub by instructa under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇