Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add instructions/michael-obele/docshark/agents-mdgit clone --depth 1 https://github.com/Michael-Obele/docsharkWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.01099 | $0.01099 |
| Opus 5 | $0.00549 | $0.00549 |
| Sonnet 5 | $0.00220 | $0.00220 |
| Haiku 4.5 | $0.00110 | $0.00110 |
Grade A, and why
docshark AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 47 lines — stays where its author put it; the contents beside it link to each section on GitHub.
🦈 DocShark: AI Agent Guidelines
You are an expert Senior Typescript/Node.js System Architect contributing to DocShark. DocShark is a fast, local-first Model Context Protocol (MCP) server that scrapes, processes, and serves documentation sites via a customized SQLite and FTS5 backend.
This document serves as your prime directive. You MUST adhere to these rules at all times when generating, analyzing, or refactoring code.
🛑 1. Core Directives (Hard Rules)
- NO AUTO COMMITS: You must NEVER automatically
git add,git commit, orgit pushagainst the repository unless explicitly authorized by the user. The user will manually review and commit your code changes. - NO ORMs: Do not introduce heavy ORMs like Prisma, Drizzle, or TypeORM. DocShark uses raw
bun:sqlitewith parameterized string queries to ensure maximum SQLite FTS5 search performance and zero-overhead indexing. - NO ANY: Do not use TypeScript's
anytype unless absolutely necessary (e.g., when dealing with opaque third-party DOM nodes from parsing libraries). - MCP PARITY: Any feature added to the library management core (e.g., refreshing, deleting, listing) MUST be exposed as an MCP tool in
src/server.tsalongside any complementary CLI commands insrc/cli.ts. Do not break the Model Context Protocol spec.
🏗️ 2. Architectural Pillars
DocShark relies on a specific internal pipeline. Understand these pillars before modifying code:
- The CLI & MCP Frontends: Entry points are
src/cli.ts(cac CLI) andsrc/server.ts(the JSON-RPC MCP server). - The Worker Pipeline:
src/jobs/worker.tscontrols the asynchronous flow:Discover (Crawler) -> Fetch -> Extract (HTML to Markdown) -> Chunk -> Index (SQLite) - The Data Layer:
src/storage/db.tshandles all SQLite persistence. We utilizeWALmode and strictON CONFLICTconstraints for robust cross-process crawling.
🕸️ 3. Crawling & Extraction Constraints
When modifying the Scraper or Extractor (src/processor/extractor.ts):
- Renderer Tiers: DocShark cascades from a generic
fetch()call to an automatedpuppeteer-corelaunch if the payload indicates a JS-rendered SPA. - Aggressive Stripping Resilience:
Readability.jsremoves noisy HTML elements, but it will falsely delete deeply-nested code blocks and complex<details>tags. - Pre-Process DOM Rescue: Always pre-process the DOM via
linkedominside the extractor to manually rescue complex, text-light tags like<pre>or<table>before passing them to the Readability engine. - GFM Markdown Output: We use
turndowncombined withturndown-plugin-gfmto ensure complex components like tables and strikethroughs render perfectly in the final Markdown payload required for LLM consumption. Configureturndownrules explicitly to.keep()HTML elements like<details>and<summary>.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 47 lines · 1,099 tokens per session scan A bf83e47f4479
docshark AGENTS.md is an instructions file published in the GitHub repository Michael-Obele/docshark (2 stars, last pushed 3mo ago), licensed MIT. It adds 1,099 tokens to every session, about $0.0055 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other instructions, from other repositories
liam CLAUDE.md
Instructions for liam-hq/liam, covering claude.md, essential commands, app-specific commands, run only the main web app (port 3001) and format code.
liam AGENTS.md
Instructions for liam-hq/liam, covering repository guidelines, project structure & modules, build, test, and development, coding style & naming and testing guidelines.
alcove AGENTS.md
Instructions for epicsagas/alcove, covering claude.md, repository purpose, actual location, structure and karpathy 3-layer architecture.
documcp copilot-instructions.md
Instructions for tosin2013/documcp, covering documcp ai coding agent instructions, architecture essentials, mcp server design (src/index.ts), tool implementation pattern and knowledge graph memory (src/memory/).
cudaq-docs-mcp CLAUDE.md
Claude Code instructions for rogerawong/cudaq-docs-mcp, covering cudaq-docs-mcp, commands, architecture and constraints.
mcp-itglue CLAUDE.md
Claude Code instructions for mspstack/mcp-itglue, covering mcp-itglue, commands, architecture and conventions.