Borrowing it
Nothing to install: this file belongs to Michael-Obele/docshark. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/Michael-Obele/docshark/master/AGENTS.mdgit clone --depth 1 https://github.com/Michael-Obele/docsharkWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/michael-obele/docshark/agents-md)<a href="https://agentmods.dev/instructions/michael-obele/docshark/agents-md"><img src="https://agentmods.dev/badge/instructions/michael-obele/docshark/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/instructions/michael-obele/docshark/agents-md"><img src="https://agentmods.dev/badge/instructions/michael-obele/docshark/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What 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.1 | $0.01099 | $0.01099 |
| Opus 5.5 | $0.00440 | $0.00440 |
| Sonnet 5.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 1mo 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.
- 1mo 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 1mo ago), licensed MIT. It adds 1,099 tokens to every session, about $0.0044 per session on Opus 5.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
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
vscode copilot-instructions.md
Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).
vscode model-prompts.instructions.md
Model-specific prompt authoring and registry guidelines.