check-file

check-file is a command for Claude Code from davepoon/buildwithclaude. It costs 21 tokens per session (362 once invoked), scanned A, original, MIT.

A file-analysis command that reviews a specified code file for quality, security, performance, dependency, and testing issues.

In plain words
What is it for?
It is for examining code structure, complexity, duplication, TypeScript or JavaScript patterns, input handling, access control, sensitive data exposure, and test coverage.
Why use it?
It brings several types of code review into one analysis, including vulnerabilities, hard-to-maintain code, slow sections, and missing tests.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the all-commands plugin — 23 commands shipped together

About the project

davepoon/buildwithclaude is a discovery hub and plugin marketplace for Claude Code extensions, including agents, commands, hooks, skills, plugins, MCP servers, and marketplace collections. Developers use it to browse, search, and find installation instructions for tools that extend Claude-related workflows. Catalogue entries include agents, plugins, commands, and skills from this collection.

davepoon/buildwithclaude · 3,419 stars · on GitHub · buildwithclaude.com

Install

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.

agentmods
npx agentmods add commands/davepoon/buildwithclaude/check-file
Clone the repo
git clone --depth 1 https://github.com/davepoon/buildwithclaude

Made for: Claude Code.

Or install all-commands, the plugin that ships this one along with the rest of its 23 commands.

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 check-file

README.md
[![agentmods](https://agentmods.dev/badge/commands/davepoon/buildwithclaude/check-file.svg)](https://agentmods.dev/commands/davepoon/buildwithclaude/check-file)
Your own site
<a href="https://agentmods.dev/commands/davepoon/buildwithclaude/check-file"><img src="https://agentmods.dev/badge/commands/davepoon/buildwithclaude/check-file.svg" alt="Measured on agentmods" height="20"></a>
Per session 21 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 362 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00021 $0.00362
Opus 5 $0.00010 $0.00181
Sonnet 5 $0.00004 $0.00072
Haiku 4.5 $0.00002 $0.00036

Measured yesterday against content hash f200d4146426, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

check-file 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 yesterday.

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.

plugins/all-commands/commands/check-file.md · 60 lines

What it actually says

File Analysis Tool

Perform comprehensive analysis of $ARGUMENTS to identify code quality issues, security vulnerabilities, and optimization opportunities.

Task

I'll analyze the specified file and provide detailed insights on:

  1. Code quality metrics and maintainability
  2. Security vulnerabilities and best practices
  3. Performance bottlenecks and optimization opportunities
  4. Dependency usage and potential issues
  5. TypeScript/JavaScript specific patterns and improvements
  6. Test coverage and missing tests

Process

I'll follow these steps:

  1. Read and parse the target file
  2. Analyze code structure and complexity
  3. Check for security vulnerabilities and anti-patterns
  4. Evaluate performance implications
  5. Review dependency usage and imports
  6. Provide actionable recommendations for improvement

Analysis Areas

Code Quality

  • Cyclomatic complexity and maintainability metrics
  • Code duplication and refactoring opportunities
  • Naming conventions and code organization
  • TypeScript type safety and best practices

Security Assessment

  • Input validation and sanitization
  • Authentication and authorization patterns
  • Sensitive data exposure risks
  • Common vulnerability patterns (XSS, injection, etc.)

Performance Review

  • Bundle size impact and optimization opportunities
  • Runtime performance bottlenecks
  • Memory usage patterns
  • Lazy loading and code splitting opportunities

Best Practices

  • Framework-specific patterns (React, Vue, Angular)
  • Modern JavaScript/TypeScript features usage
  • Error handling and logging practices
  • Testing patterns and coverage gaps

I'll provide specific, actionable recommendations tailored to your project's technology stack and architecture.

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. yesterday First seen · 60 lines · 21 tokens per session scan A f200d4146426

Subscribe to this mod's changes

check-file is a command published in the GitHub repository davepoon/buildwithclaude (3,419 stars, last pushed yesterday), licensed MIT. It adds 21 tokens to every session and 362 once invoked, about $0.0001 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-09-05.