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

v1.0.1

Published

Core types, schemas, and utilities for agents-markdown ecosystem

Readme

@reaatech/agents-markdown

npm version License: MIT CI

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

Core domain types, Zod validation schemas, and shared utilities for the @reaatech/agents-markdown-* ecosystem. This package is the single source of truth for all document shapes — AgentsMdDocument, SkillMdDocument, Finding, LintResult, ValidationResult — used throughout the toolkit.

Installation

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

Feature Overview

  • Canonical domain typesAgentsMdDocument, SkillMdDocument, ValidationResult, LintResult, Finding, ScaffoldConfig, and 10+ more interfaces
  • Zod validation schemasAgentsMdSchema, SkillMdSchema, AgentsMdFrontmatterSchema, SkillMdFrontmatterSchema derived from the AGENTS.md specification
  • Shared utilitiesassertNever, delay, debounce, groupBy, randomId, sanitizePath, normalizeLineEndings, truncate
  • Inferred typesAgentsMdFrontmatter, SkillMdFrontmatter, AgentsMdValidation, SkillMdValidation, McpTool, SkillReference
  • Version constantVERSION string shared across the ecosystem

Quick Start

import type { AgentsMdDocument, ValidationResult } from "@reaatech/agents-markdown";
import { AgentsMdFrontmatterSchema, VERSION } from "@reaatech/agents-markdown";
import { assertNever, groupBy, randomId } from "@reaatech/agents-markdown";

// Validate frontmatter with Zod
const parsed = AgentsMdFrontmatterSchema.safeParse({
  agent_id: "my-agent",
  display_name: "My Agent",
  version: "1.0.0",
  description: "An example agent",
  type: "mcp",
});

if (!parsed.success) {
  console.error(parsed.error.issues);
}

API Reference

AgentsMdDocument

The parsed representation of an AGENTS.md file after running through the @reaatech/agents-markdown-parser.

interface AgentsMdDocument {
  path: string;
  raw: string;
  frontmatter: ParsedFrontmatter;
  title: string;
  sections: Section[];
  tables: MarkdownTable[];
  codeBlocks: CodeBlock[];
  frontmatterRange?: { start: number; end: number };
}

SkillMdDocument

Identical shape to AgentsMdDocument, representing a parsed SKILL.md file.

ValidationResult

Returned by validators in @reaatech/agents-markdown-validator.

interface ValidationResult {
  valid: boolean;
  type: "agents" | "skill";
  path: string;
  errors: Finding[];
  warnings: Finding[];
  suggestions: Finding[];
}

LintResult

Returned by runLintRules in @reaatech/agents-markdown-linter.

| Property | Type | Description | |----------|------|-------------| | path | string | File path being linted | | findings | Finding[] | All findings across all rules | | errorCount | number | Number of error-severity findings | | warningCount | number | Number of warning-severity findings | | infoCount | number | Number of info-severity findings | | fixableCount | number | Number of auto-fixable findings |

Finding

| Property | Type | Required | Description | |----------|------|----------|-------------| | rule | string | Yes | Rule identifier | | severity | Severity | Yes | "error" \| "warning" \| "info" \| "suggestion" | | message | string | Yes | Human-readable description | | location | ErrorLocation | No | Line/column in source | | suggestion | string | No | Suggested fix text | | autoFixable | boolean | No | Whether an auto-fix exists | | fix | unknown | No | Fix payload for auto-fix engine |

ScaffoldConfig

interface ScaffoldConfig {
  agentType: AgentType;
  agentId: string;
  displayName: string;
  description?: string;
  version?: string;
  skills: ScaffoldSkillConfig[];
  outputDir: string;
  overwrite?: boolean;
}

Schemas

All Zod schemas are exported as named consts. Inferred types are exported alongside them.

| Schema | Inferred Type | Validates | |--------|---------------|-----------| | AgentsMdFrontmatterSchema | AgentsMdFrontmatter | YAML frontmatter fields (agent_id, display_name, version, description) | | SkillMdFrontmatterSchema | SkillMdFrontmatter | YAML frontmatter fields (skill_id, display_name, version, description) | | AgentsMdSchema | AgentsMdValidation | Full AGENTS.md structure with required sections | | SkillMdSchema | SkillMdValidation | Full SKILL.md structure with required sections | | McpToolSchema | McpTool | MCP tool definition (name, inputSchema, output, rateLimit) | | SkillReferenceSchema | SkillReference | Skill reference (skillId, path) | | SectionSchema | SchemaSection | Section heading metadata |

Utilities

| Function | Signature | Description | |----------|-----------|-------------| | assertNever | (x: never) => never | Exhaustive switch guard | | delay | (ms: number) => Promise<void> | setTimeout wrapper | | randomId | () => string | crypto.randomUUID() | | sanitizePath | (path: string) => string | Backslash to forward slash | | normalizeLineEndings | (text: string) => string | \r\n\n | | truncate | (text: string, max: number) => string | Truncate with ... | | debounce | (fn: Function, ms: number) => Function | Generic debounce | | groupBy | <T, K>(arr: T[], fn: (item: T) => K) => Record<K, T[]> | Generic groupBy |

Type Aliases

| Type | Values | |------|--------| | Severity | "error" \| "warning" \| "info" \| "suggestion" | | AgentType | "mcp" \| "orchestrator" \| "classifier" \| "router" \| "evaluator" | | SkillType | "tool" \| "orchestration" \| "evaluation" \| "routing" | | OutputFormat | "console" \| "json" \| "html" \| "markdown" |

Related Packages

License

MIT