mycop: Instructions file for Claude Code

CLAUDE.md

mycop CLAUDE.md is an instructions file for Claude Code from AbdumajidRashidov/mycop. It costs 1,383 tokens per session, scanned A, original, MIT.

Repository instructions for mycop, a Rust security scanner that checks AI-generated Python, JavaScript, TypeScript, Go, and Java code for known vulnerability patterns.

In plain words
What is it for?
Use them when building, testing, formatting, linting, or extending mycop’s vulnerability-scanning pipeline.
Why use it?
They explain how configuration, file discovery, security rules, parallel scanning, severity filtering, and reporting fit together.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md; mentions Claude Code.

This is AbdumajidRashidov/mycop's own configuration. It tells Claude Code how to work on mycop itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything mycop configures →

Reuse

Borrowing it

Nothing to install: this file belongs to AbdumajidRashidov/mycop. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/AbdumajidRashidov/mycop/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/AbdumajidRashidov/mycop

Made for: Claude Code.

Wrote 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.

agentmods badge for mycop CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/abdumajidrashidov/mycop/claude-md/github.svg)](https://agentmods.dev/instructions/abdumajidrashidov/mycop/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/abdumajidrashidov/mycop/claude-md"><img src="https://agentmods.dev/badge/instructions/abdumajidrashidov/mycop/claude-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.

agentmods 80×15 button for mycop CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/abdumajidrashidov/mycop/claude-md"><img src="https://agentmods.dev/badge/instructions/abdumajidrashidov/mycop/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,383 This file is loaded in full into every session.
When invoked 1,383 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.01383 $0.01383
Opus 5 $0.00691 $0.00691
Sonnet 5 $0.00277 $0.00277
Haiku 4.5 $0.00138 $0.00138

Measured 11d ago against content hash 9c68c625d94d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

mycop CLAUDE.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 11d 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.

CLAUDE.md · 74 lines

How it starts

The opening of the file, as written. The whole thing — 74 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

What is mycop

mycop is an AI-powered code security scanner (SAST) written in Rust. It detects vulnerabilities in AI-generated code targeting Python, JavaScript, TypeScript, Go, and Java, with 200 built-in YAML security rules covering OWASP Top 10 and CWE Top 25.

Build & Development Commands

cargo build                    # Debug build
cargo build --release          # Optimized release build
cargo test --verbose           # Run all tests
cargo test scanner_tests       # Run a specific test module
cargo fmt --all -- --check     # Check formatting (CI enforced)
cargo clippy --all-targets -- -D warnings  # Lint (CI enforced, warnings are errors)

CI runs on both Ubuntu and macOS with stable Rust. All PRs must pass fmt, clippy, build, and test.

Architecture

Data Flow

CLI parsing (clap) → Config loading (.scanrc.yml) → File discovery (walkdir + gitignore) → Rule loading (embedded YAML via include_str!) → Parallel scanning (Rayon) → Severity filtering → Optional AI processing → Output reporting

Module Map (src/)

  • cli.rs — Clap-derived CLI definitions. Subcommands: scan, fix, review, init, rules list, deps check, mcp
  • main.rs — Command routing and orchestration for all subcommands
  • scanner/ — Core scanning engine
    • engine.rs — Parallel file scanning with Rayon (scan_files returns Vec<Finding>)
    • language.rs — Language detection from file extensions (Python, JS, TS, Go, Java)
    • file_discovery.rs — File globbing, gitignore-aware traversal, --diff mode via git
  • rules/ — Security rule system
    • registry.rs — Loads 200 YAML rules embedded at compile time via include_str! from rules/python/, rules/javascript/, rules/go/, and rules/java/
    • matcher.rs — Pattern matching using tree-sitter AST queries + regex. Produces Finding structs
    • parser.rs — YAML rule deserialization
  • ai/ — Pluggable AI backends behind the AiBackend trait
    • types.rsAiBackend trait with explain(), deep_review(), fix_file() methods
    • mod.rs — Auto-detection and factory (detect_ai_provider, create_backend). Priority: Claude CLI → Anthropic API → OpenAI API → Ollama → rule-based fallback
    • Provider impls: claude_cli.rs, anthropic.rs, openai.rs, ollama.rs, rule_based.rs
    • prompt.rs — Prompt templates for AI interactions
  • fixer.rs — Auto-fix flow: groups findings per file, sends to AI, extracts <FIXED_FILE> tags from response, generates diffs, optionally writes back and re-scans for verification. Also provides diff_to_string() for generating plain-text diffs
  • mcp/ — MCP (Model Context Protocol) server for agentic tool integration
    • mod.rsMycopMcpServer struct implementing ServerHandler trait. Handles list_tools, call_tool, list_resources, read_resource. Starts STDIO transport via MycopMcpServer::run()
    • tools.rs — 5 MCP tools implemented on MycopMcpServer using #[tool] proc macro: scan, list_rules, explain_finding, review, check_deps. The fix tool is intentionally excluded from MCP — agentic tools should read scan findings and apply fixes themselves. Sync impl functions bridged to async via tokio::task::spawn_blocking. Tools registered via rmcp::tool_box! macro
    • types.rs — MCP-specific request/response schemas with Deserialize + JsonSchema (inputs) and Serialize (outputs). Separate from core types to isolate MCP concerns
    • convert.rs — Conversions between core types (Finding, Rule) and MCP output types (FindingOutput, RuleOutput)
  • reporter/ — Output formatters implementing the Reporter trait
    • terminal.rs (colored), json.rs, sarif.rs (for CI/IDE integration)
  • config/scanrc.rs — Loads .scanrc.yml / .mycop.yml config (ignore patterns, min_severity, fail_on, ai_provider)

Read the full file on GitHub · 74 lines

Changes

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.

  1. 11d ago First seen · 74 lines · 1,383 tokens per session scan A 9c68c625d94d

Subscribe to this mod's changes

mycop CLAUDE.md is an instructions file published in the GitHub repository AbdumajidRashidov/mycop (9 stars, last pushed 6mo ago), licensed MIT. It adds 1,383 tokens to every session, about $0.0069 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.

Related

Other instructions, from other repositories

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.

vercel/next.js · 7,296 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,153 tokens

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).

microsoft/vscode · 6,785 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

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.

langchain-ai/langchain · 4,469 tokens