npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@reaatech/agents-markdown-cli

v1.0.1

Published

CLI tool for agents-markdown ecosystem

Downloads

218

Readme

@reaatech/agents-markdown-cli

npm version License: MIT CI

Status: Pre-1.0 — APIs may change in minor versions. Pin to a specific version in production.

Command-line interface for linting, validating, scaffolding, and formatting AGENTS.md and SKILL.md files. Built on Commander with colorized output, JSON/HTML/Markdown reporting, and CI-friendly exit codes.

Installation

npm install -g @reaatech/agents-markdown-cli
# or
pnpm add -g @reaatech/agents-markdown-cli

Feature Overview

  • Five subcommandslint, validate, scaffold, format, examples
  • Multi-format output — Console, JSON, HTML, and Markdown reporters
  • CI/CD ready — Structured exit codes (0 = pass, 1 = errors, 2 = warnings, 3 = execution error)
  • Directory traversal — Lint or validate entire agent directories recursively
  • Auto-fix — Format command with --fix and --dry-run modes
  • Example gallery — List, show, and copy example agent and skill files
  • Observability — All operations emit structured logs and OTel metrics

Quick Start

# Lint a single file
agents-md-kit lint ./AGENTS.md

# Lint a directory, output JSON
agents-md-kit lint ./agents/ --format json --output lint-results.json

# Validate in strict mode
agents-md-kit validate ./AGENTS.md --strict

# Scaffold a new MCP server agent
agents-md-kit scaffold \
  --agent-id my-mcp-server \
  --display-name "My MCP Server" \
  --agent-type mcp \
  --output-dir ./my-agent/

# Auto-fix formatting (dry-run first)
agents-md-kit format ./agents/ --fix --dry-run
agents-md-kit format ./agents/ --fix

# List available examples
agents-md-kit examples
agents-md-kit examples show mcp-server

API Reference

Library Usage

The CLI also exports utility functions for programmatic use:

import {
  lintFile,
  lintDirectory,
  validateFile,
  validateDirectory,
  parseFile,
  scaffoldAgent,
  applyFixesToFile,
  findMarkdownFiles,
  filterLintResult,
  pathIsDirectory,
} from "@reaatech/agents-markdown-cli";

File Operations

| Function | Signature | Description | |----------|-----------|-------------| | parseFile | (filePath: string) => Promise<Document> | Parse a file into a document | | lintFile | (filePath: string) => Promise<LintResult> | Lint a single file | | lintDirectory | (dirPath: string) => Promise<LintResult[]> | Lint all markdown files in a directory | | validateFile | (filePath: string, strict?: boolean) => Promise<ValidationResult> | Validate a single file | | validateDirectory | (dirPath: string, strict?: boolean) => Promise<ValidationResult[]> | Validate all markdown files in a directory | | scaffoldAgent | (config: ScaffoldConfig, dryRun?: boolean) => GenerateResult | Generate agent files | | applyFixesToFile | (filePath: string, ruleIds: string[]) => Promise<{original, fixed}> | Apply auto-fixes to a file | | findMarkdownFiles | (dirPath: string) => Promise<string[]> | Recursive markdown file discovery | | filterLintResult | (result: LintResult, minSeverity: Severity) => LintResult | Filter findings by severity threshold | | pathIsDirectory | (path: string) => Promise<boolean> | Check if a path is a directory |

Exit Codes

| Code | Meaning | |------|---------| | 0 | All checks passed (no errors, no warnings above threshold) | | 1 | Validation errors found | | 2 | Lint warnings found (with --fail-on warning) | | 3 | Execution error (file not found, parse error, internal failure) |

CLI Options

lint

| Option | Type | Description | |--------|------|-------------| | --format | console \| json \| html \| markdown | Output format (default: console) | | --output | string | Write output to file | | --fail-on | error \| warning \| info | Minimum severity to fail on (default: error) |

validate

| Option | Type | Description | |--------|------|-------------| | --strict | boolean | Fail on warnings in addition to errors | | --format | console \| json \| markdown | Output format | | --output | string | Write output to file |

scaffold

| Option | Type | Required | Description | |--------|------|----------|-------------| | --agent-id | string | Yes | Agent identifier | | --display-name | string | Yes | Human-readable name | | --agent-type | mcp \| orchestrator \| classifier \| router \| evaluator | Yes | Agent type | | --description | string | No | Agent description | | --version | string | No | Version string (default: 1.0.0) | | --output-dir | string | Yes | Output directory | | --overwrite | boolean | No | Overwrite existing files | | --skills | string | No | Comma-separated skill IDs |

format

| Option | Type | Description | |--------|------|-------------| | --fix | boolean | Apply fixes (default: off, dry-run only) | | --dry-run | boolean | Preview fixes without writing | | --rules | string | Comma-separated rule IDs to fix (default: all fixable) |

CI/CD Integration

# .github/workflows/agents-md-lint.yml
- name: Lint agent files
  run: |
    pnpm add -g @reaatech/agents-markdown-cli
    agents-md-kit lint ./agents/ --format json --output lint-results.json

- name: Validate schema
  run: agents-md-kit validate ./agents/ --strict

Related Packages

License

MIT