Agent skill

Convex Doctor

by waynesutton in waynesutton/markdown-site

Run convex-doctor static analysis, interpret findings, and fix issues across security, performance, correctness, schema, and architecture categories.

MITAuto-check passedDevelopment

Install Convex Doctor

skills CLI
$ npx skills add waynesutton/markdown-site --skill convex-doctor -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install waynesutton/markdown-site convex-doctor --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/waynesutton/markdown-site.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.cursor/skills/convex-doctor .claude/skills/convex-doctor && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
convex-doctor
GitHub stars
627
Token cost
~1.9k tokens
SKILL.md length
871 words
Files
1
Skills in repo
17
Repo updated
First seen
Licence
MIT

At a glance

Run convex-doctor static analysis, interpret findings, and fix issues across security, performance, correctness, schema, and architecture categories.

  • Works in 5 steps: Security errors (highest priority) → Correctness errors → Performance warnings → …
  • Running convex-doctor
  • SKILL.md covers What is convex-doctor, Configuration, Fix priority order and Common fix patterns, plus 5 more sections
  • Calls npx and npm

What it does

Convex Doctor is an agent skill from waynesutton/markdown-site. Run convex-doctor static analysis, interpret findings, and fix issues across security, performance, correctness, schema, and architecture categories. Use when running convex-doctor, fixing convex-doctor warnings or errors, improving the convex-doctor score, or when asked about Convex code quality, static analysis, or linting Convex functions.

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Static analysis and SAST, Linting and formatting and Code quality. The repository describes itself as: An open-source publishing framework built for AI agents and developers to ship websites, docs, or blogs. Write markdown, sync from the terminal. Your content is instantly… The licence is MIT.

When your agent uses it

  • Running convex-doctor
  • Fixing convex-doctor warnings
  • Improving the convex-doctor score
  • Asked about Convex code quality

Example prompts

  • “/convex-doctor”

Requirements

  • Node.js

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Security errors (highest priority)
  2. Correctness errors
  3. Performance warnings
  4. Schema warnings
  5. Architecture warnings

What it can do on your machine

Read from SKILL.md and the folder at commit 3872c59. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npx
    • npm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Convex Doctor loads about 1.9k tokens when it runs. Until then it costs about 90 tokens; SKILL.md has 871 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~90
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from waynesutton/markdown-site at commit 3872c59, republished under its MIT licence (© waynesutton). 871 words, ~1,855 tokens.

Download SKILL.mdSave it as .claude/skills/convex-doctor/SKILL.md (or your agent's skills folder).
name
convex-doctor
description
Run convex-doctor static analysis, interpret findings, and fix issues across security, performance, correctness, schema, and architecture categories. Use when running convex-doctor, fixing convex-doctor warnings or errors, improving the convex-doctor score, or when asked about Convex code quality, static analysis, or linting Convex functions.

Convex doctor workflow

This skill codifies the full convex-doctor remediation workflow used in this codebase (score 42 to 100 across 17 passes). Follow it whenever running convex-doctor or fixing its findings.

What is convex-doctor

convex-doctor is a static analysis tool for Convex backends. It scores your codebase 0 to 100 across five categories: security, correctness, performance, schema, and architecture.

Run it with:

bash
npx convex-doctor@latest

Configuration

This project has a convex-doctor.toml at the repo root with intentional suppressions. Always check it before working on findings.

Current suppressions and rationale
RuleLevelRationale
correctness/generated-code-modifiedoffWorking tree is always dirty after codegen
schema/optional-field-no-default-handlingoff94 optional fields by design for markdown frontmatter
correctness/missing-uniqueoffRemaining .first() calls are intentional ordered picks
schema/deep-nestingoff4-level validators needed for chat attachments
schema/array-relationshipsoffFlagged on function args, not table columns
perf/missing-index-on-foreign-keyoffRemaining FK is inside nested array (not indexable)
arch/duplicated-authoffAuth awareness is intentional per public handler
arch/monolithic-fileoffFiles organized by domain
arch/large-handleroffEmail templates, sync, and search are inherently multi-step
Ignored files
  • convex/_generated/** (generated code)
  • convex/authComponent.ts (thin auth component forwarders)

Fix priority order

When convex-doctor reports findings, fix them in this order:

  1. Security errors (highest priority)

    • Add auth to HTTP actions and public endpoints
    • Convert api.* server-to-server calls to internal.*
    • Move public actions to mutation-scheduled internal actions
  2. Correctness errors

    • Remove Date.now() from queries (breaks caching and reactivity)
    • Convert .first() to .unique() only where the index enforces uniqueness
    • Fix collect then filter patterns with indexed queries
  3. Performance warnings

    • Replace unbounded .collect() with .take(n) or pagination
    • Batch sequential ctx.run* calls into single internal queries
    • Eliminate N+1 patterns in HTTP and RSS endpoints
  4. Schema warnings

    • Add missing indexes for foreign keys where query patterns exist
    • Rename indexes to by_field snake_case convention
    • Remove redundant indexes (prefixes of compound indexes)
  5. Architecture warnings

    • Extract helper functions from large handlers
    • Split provider modules from orchestration logic
    • Replace throw new Error(...) with ConvexError in user-facing handlers

Common fix patterns

Convert public action to queued job

Instead of calling a public action from the browser, create a job table and mutation-scheduled internal action:

  1. Add a job table to convex/schema.ts with status, result, and error fields
  2. Create a public mutation that inserts a pending job and schedules the internal action
  3. Create a public query that returns job status for the UI
  4. Convert the action to internalAction that updates the job record on completion or failure
  5. Update the frontend to call the mutation and poll the query

This pattern was used for: AI image generation, AI chat responses, URL imports.

Convert api.* to internal.*

When a Convex function calls another Convex function on the server side:

  1. Create an internal* version if only a public version exists
  2. Replace api.module.fn with internal.module.fn in the caller
  3. If the function needs both public and internal access, keep both and have the public version call the internal one
Batch sequential ctx.run* calls

When an action makes multiple ctx.runQuery calls for independent data:

  1. Create a single internal query that returns all needed data in one object
  2. Replace the sequential calls with one ctx.runQuery to the batched query
  3. This reduces transaction overhead and eliminates the sequential-run-calls warning
Show full SKILL.md (337 more words)Show less
Remove Date.now() from queries

Queries must be deterministic. Replace Date.now() with a timestamp argument:

  1. Add a now: v.number() argument to the query
  2. Pass Date.now() from the frontend or from the action/mutation that calls the query
  3. For reactive subscriptions, round the timestamp (e.g., 60-second intervals) to keep reactivity stable
Auth component helper conversion

When components.auth.public.* triggers direct-function-ref warnings:

  1. Create helper functions in convex/authComponent.ts that call the component API
  2. Import helpers directly instead of using ctx.runQuery(internal.authComponent.*)
  3. Add convex/authComponent.ts to the [ignore] section of convex-doctor.toml

Verification checklist

After every fix pass:

  • npx convex codegen passes
  • npx tsc --noEmit passes (or npx convex codegen covers this)
  • npm run build succeeds
  • npx convex-doctor@latest shows improved score or fewer findings
  • Existing functionality still works (AI chat, search, dashboard, RSS, stats)

Score history

PassScoreErrorsWarningsKey changes
Initial42/10073243Baseline
1 (remediation)~55~50~221Security: auth on HTTP, api to internal
2~60~40~200AI action flow, HTTP hardening
368/100--collect-then-filter, auth signals
1080/100168Import URL queued job, unique lookups
1591/100043Newsletter batching, auth forwarders, toml config
1692/100039Semantic search batching, auth helpers
17100/10000Stats helpers, contact helpers, final toml tuning

When to suppress vs fix

Fix it when:

  • The finding points to a real bug or security gap
  • The fix is low risk and improves code quality
  • The pattern can be changed without affecting product behavior

Suppress it when:

  • The finding is a tool false positive (e.g., component function refs)
  • The pattern is intentional by design (e.g., per-handler auth checks)
  • The fix would add more complexity than the warning is worth
  • Generated code triggers the finding

Always document suppressions with rationale in convex-doctor.toml.

All remediation PRDs are in prds/convex-doctor/:

  • convex-doctor-remediation.md (initial plan, 5 phases)
  • convex-doctor-second-pass.md through convex-doctor-seventeenth-pass.md
  • convex-doctor.toml (suppression config)
  • convex/schema.ts (indexes and table definitions)
  • convex/authComponent.ts (auth component forwarders)
  • convex/importJobs.ts (queued job pattern example)
  • convex/aiImageJobs.ts (queued job pattern example)
  • convex/semanticSearchJobs.ts (queued job pattern example)

© waynesutton, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .cursor/skills/convex-doctor of waynesutton/markdown-site.

Open the folder on GitHubat commit 3872c59

Compare with similar skills

Convex Doctor next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Convex Doctor compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Convex Doctor this skillwaynesutton/markdown-site627—~1.9kAutomated safety check: PassMIT
Grails Violation Fixerapache/grails-core2.9k—~3.9kAutomated safety check: PassApache-2.0
Code Qualitybonny/WordPress-Simple-History317—~519Automated safety check: NotesNone
Code QualityBlackBeltTechnology/pi-agent-dashboard315—~1.3kAutomated safety check: PassMIT
Dx Code Analyzer Runforcedotcom/sf-skills1.1k—~6.3kAutomated safety check: PassApache-2.0
Install Anti-Slop Oxlint Rulesdmmulroy/anti-slop5.4k—~2.2kAutomated safety check: PassMIT

Similar skills

  • Grails Violation Fixer

    apache/grails-core

    Guide to running, reading and fixing code style and analysis violations in grails-core with CodeNarc, Checkstyle, PMD, SpotBugs, Spotless and JaCoCo through Gradle.

    2.9k GitHub stars~3.9k tokensUpdated today
    DevelopmentAuto-check passed
  • Code Quality

    bonny/WordPress-Simple-History

    Runs linting and static analysis on PHP/CSS/JS using phpcs, phpstan, and rector.

    317 GitHub stars~519 tokensUpdated 3 days ago
    DevelopmentAuto-check: notes
  • Code Quality

    BlackBeltTechnology/pi-agent-dashboard

    Drive static-analysis code quality in pi-agent-dashboard with Biome (analyze → fix → test), in changed-files or whole-repo mode.

    315 GitHub stars~1.3k tokensUpdated today
    DevelopmentAuto-check passed
  • Dx Code Analyzer Run

    forcedotcom/sf-skills

    Run Salesforce Code Analyzer to scan code for security, performance, best practice, and code style violations.

    1.1k GitHub stars~6.3k tokensUpdated today
    DevelopmentAuto-check passed
  • Installs, updates or migrates the vendored anti-slop Oxlint plugin in a repository, keeping local rule changes and the plugin's license and provenance files.

    5.4k GitHub stars~2.2k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • Checklist for wiring a new linter into Opik's Code Quality pipeline: the four files to edit, the silent-failure gotchas and the pass/fail verification loop.

    22k GitHub stars~2.3k tokensUpdated today
    DevelopmentAuto-check passed

More from waynesutton/markdown-site

All 17 skills in this repo
  • Convex Self Hosting

    waynesutton/markdown-site

    Integrate Convex static self hosting into existing apps using the latest upstream instructions from get-convex/self-hosting every time.

    627 GitHub stars~1.4k tokensUpdated 4 mo ago
    Auto-check passed
  • Robel Auth

    waynesutton/markdown-site

    Integrate and maintain Robelest Convex Auth in apps by always checking upstream before implementation.

    627 GitHub stars~4.4k tokensUpdated 4 mo ago
    Auto-check passed
  • Migration Helper

    waynesutton/markdown-site

    Plan and execute Convex schema migrations safely, including adding fields, creating tables, and data transformations.

    627 GitHub starsUsed in 1 repo~958 tokens
    Auto-check passed
  • Convex Return Validators

    waynesutton/markdown-site

    Guide for when to use and when not to use return validators in Convex functions.

    627 GitHub stars~2.4k tokensUpdated 4 mo ago
    Auto-check passed
  • Convex Quickstart

    waynesutton/markdown-site

    Initialize a new Convex project from scratch or add Convex to an existing app.

    627 GitHub stars~1.2k tokensUpdated 4 mo ago
    Auto-check: notes
  • Convex Setup Auth

    waynesutton/markdown-site

    Set up Convex authentication with proper user management, identity mapping, and access control patterns.

    627 GitHub stars~1.4k tokensUpdated 4 mo ago
    Auto-check passed

Categories

Questions about Convex Doctor

What does Convex Doctor do?

Run convex-doctor static analysis, interpret findings, and fix issues across security, performance, correctness, schema, and architecture categories. Convex Doctor is an agent skill from waynesutton/markdown-site. Run convex-doctor static analysis, interpret findings, and fix issues across security, performance, correctness, schema, and architecture categories.

When should I use Convex Doctor?

Convex Doctor fits situations like: running convex-doctor; fixing convex-doctor warnings; improving the convex-doctor score; asked about Convex code quality.

How do I install Convex Doctor in Claude Code?

Run `npx skills add waynesutton/markdown-site --skill convex-doctor -a claude-code`. Or copy the skill folder (.cursor/skills/convex-doctor in waynesutton/markdown-site) into .claude/skills/convex-doctor in your project. Claude Code loads it when a task matches its description.

How do I install Convex Doctor in Codex?

Run `npx skills add waynesutton/markdown-site --skill convex-doctor -a codex`. Or copy the skill folder (.cursor/skills/convex-doctor in waynesutton/markdown-site) into .agents/skills/convex-doctor in your project. Codex loads it when a task matches its description.

Can I use Convex Doctor in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add waynesutton/markdown-site --skill convex-doctor -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/convex-doctor, .gemini/skills/convex-doctor, .github/skills/convex-doctor and .opencode/skills/convex-doctor in your project.

What does Convex Doctor need to run?

Going by SKILL.md and its folder, Convex Doctor needs the command-line tools its instructions call (npx and npm). Our summary lists: Node.js.

Does Convex Doctor access the network?

SKILL.md names 1 domain. As links in the text: github.com. This is read from the text; nothing was executed.

Is Convex Doctor safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Convex Doctor use?

Convex Doctor is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Convex Doctor use?

About 1.9k tokens (SKILL.md is roughly 7.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Convex Doctor?

Skills that share tags, products or a category with Convex Doctor: Grails Violation Fixer (apache/grails-core, 2.9k stars), Code Quality (bonny/WordPress-Simple-History, 317 stars), Code Quality (BlackBeltTechnology/pi-agent-dashboard, 315 stars) and Dx Code Analyzer Run (forcedotcom/sf-skills, 1.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Convex Doctor?

waynesutton (a GitHub user) maintains it in waynesutton/markdown-site, which has 627 GitHub stars. The repository holds 17 skills in this directory. The repository was last updated on May 20, 2026.

Source: waynesutton/markdown-site on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.