agentleFS
xirothedevxirothedev/agent-skills/AGENTS.md

agent-skills

AGENTS.md12 starsChanged 11 months agoMITView on GitHub

A collection of packages and skills for NestJS best practices and AI agent assistance. Contains tooling for migrating NestJS projects to follow best practices, plus skills for Claude.ai and Claude Code. Located in packages/nestjs-best-practices-build/, this package helps migrate NestJS projects to follow best practices from vercel/nestjs-best-practices. Key features: - Migrates package manager from pnpm to bun 1.3.6 - Configures TypeScript for bun runtime - Validates and extracts test files - Supports configurable migration rules Configuration: - tsconfig.json - Configured for…

  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.

    Of the AGENTS.md files we read, the 35,337 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repositoryOne other file it gives its agents.

The file

Show its rules and text

We split this AGENTS.md into the rules it gives an agent

23 rules. About 0 are common, 11 are distinctive, and 12 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈11

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 12

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    SKILL.md: Always uppercase, always this exact filename

    line 51
  2. Very specific:

    Zip file: Must match directory name exactly: {skill-name}.zip

    line 53
  3. Very specific:

    Use set -e for fail-fast behavior

    line 109
  4. Very specific:

    Write status messages to stderr: echo "Message" >&2

    line 110
  5. Distinctive:

    Write machine-readable output (JSON) to stdout

    line 111
  6. Distinctive:

    When using this repository's tools with NestJS projects:

    line 117
  7. Distinctive:

    Package Manager: Use bun 1.3.6 for optimal performance

    line 119
  8. Distinctive:

    Use dependency injection properly

    line 133
  9. Distinctive:

    Use guards for authentication/authorization

    line 135
  10. Distinctive:

    Follow the official NestJS documentation patterns

    line 137
  11. Very specific:

    Use @nestjs/testing for unit tests

    line 140
  12. Distinctive:

    Write e2e tests for critical flows

    line 141
  13. Distinctive:

    After creating or updating a skill:

    line 146
  14. Distinctive:

    Document these two installation methods for users:

    line 155
  15. Very specific:

    Add the skill to project knowledge or paste SKILL.md contents into the conversation.

    line 163
  16. Very specific:

    If the skill requires network access, instruct users to add required domains at claude.ai/settings/capabilities.

    line 165
  17. Very specific:

    Solution: Ensure tsconfig.json has "moduleResolution": "bundler" and no .js extensions in imports

    line 172
  18. Very specific:

    Solution: Update all CI/CD workflows and scripts to use bun instead of pnpm

    line 178
  19. Very specific:

    Solution: Verify SKILL.md has valid frontmatter with name and description fields

    line 183
  20. Very specific:

    Solution: Ensure scripts have execute permissions: chmod +x scripts/*.sh

    line 186
  21. Distinctive:

    Network timeouts: Check firewall rules and domain allowlists

    line 190
  22. Distinctive:

    Path issues: Use absolute paths when referencing skill scripts

    line 191
  23. Very specific:

    Context limits: Keep SKILL.md under 500 lines, use supporting files for detailed docs

    line 192

≈ “Common” is an estimate: at least 1 in 5 of the 45,344 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

AGENTS.md

This file provides guidance to AI coding agents (Claude Code, Cursor, Copilot, etc.) when working with code in this repository.

Repository Overview

A collection of packages and skills for NestJS best practices and AI agent assistance. Contains tooling for migrating NestJS projects to follow best practices, plus skills for Claude.ai and Claude Code.

Packages

nestjs-best-practices-build

Located in packages/nestjs-best-practices-build/, this package helps migrate NestJS projects to follow best practices from vercel/nestjs-best-practices.

Key features:

  • Migrates package manager from pnpm to bun 1.3.6
  • Configures TypeScript for bun runtime
  • Validates and extracts test files
  • Supports configurable migration rules

Usage:

cd packages/nestjs-best-practices-build
bun run migrate              # Run full migration
bun run validate             # Validate project structure
bun run extract-tests        # Extract test files
bun run build                # Build the package

Configuration:

  • tsconfig.json - Configured for bun (ESNext, bundler module resolution)
  • package.json - Uses bun as package manager with @types/bun for TypeScript support
  • src/config.ts - Migration rules and configuration

Creating a New Skill

Directory Structure

skills/
  {skill-name}/           # kebab-case directory name
    SKILL.md              # Required: skill definition
    scripts/              # Required: executable scripts
      {script-name}.sh    # Bash scripts (preferred)
  {skill-name}.zip        # Required: packaged for distribution

Naming Conventions

  • Skill directory: kebab-case (e.g., vercel-deploy, log-monitor)
  • SKILL.md: Always uppercase, always this exact filename
  • Scripts: kebab-case.sh (e.g., deploy.sh, fetch-logs.sh)
  • Zip file: Must match directory name exactly: {skill-name}.zip

SKILL.md Format

---
name: {skill-name}
description: {One sentence describing when to use this skill. Include trigger phrases like "Deploy my app", "Check logs", etc.}
---

# {Skill Title}

{Brief description of what the skill does.}

## How It Works

{Numbered list explaining the skill's workflow}

## Usage

```bash
bash /mnt/skills/user/{skill-name}/scripts/{script}.sh [args]

Arguments:

  • arg1 - Description (defaults to X)

Examples: {Show 2-3 common usage patterns}

Output

{Show example output users will see}

Present Results to User

{Template for how Claude should format results when presenting to users}

Troubleshooting

{Common issues and solutions, especially network/permissions errors}


### Best Practices for Context Efficiency

Skills are loaded on-demand — only the skill name and description are loaded at startup. The full `SKILL.md` loads into context only when the agent decides the skill is relevant. To minimize context usage:

- **Keep SKILL.md under 500 lines** — put detailed reference material in separate files
- **Write specific descriptions** — helps the agent know exactly when to activate the skill
- **Use progressive disclosure** — reference supporting files that get read only when needed
- **Prefer scripts over inline code** — script execution doesn't consume context (only output does)
- **File references work one level deep** — link directly from SKILL.md to supporting files

### Script Requirements

- Use `#!/bin/bash` shebang
- Use `set -e` for fail-fast behavior
- Write status messages to stderr: `echo "Message" >&2`
- Write machine-readable output (JSON) to stdout
- Include a cleanup trap for temp files
- Reference the script path as `/mnt/skills/user/{skill-name}/scripts/{script}.sh`

## Working with NestJS Projects

When using this repository's tools with NestJS projects:

1. **Package Manager**: Use bun 1.3.6 for optimal performance
   ```bash
   bun install              # Install dependencies
   bun run build           # Build the project
   bun run start           # Start the application
  1. TypeScript Configuration:
    • Target: ES2017 or ESNext
    • Module: ESNext
    • Module resolution: bundler
    • Types: @types/bun instead of @types/node
  2. Best Practices:
    • Use dependency injection properly
    • Implement proper error handling with exception filters
    • Use guards for authentication/authorization
    • Implement DTOs with validation pipes
    • Follow the official NestJS documentation patterns
  3. Testing:
    • Use @nestjs/testing for unit tests
    • Write e2e tests for critical flows
    • Mock external dependencies properly

Creating the Zip Package

After creating or updating a skill:

cd skills
zip -r {skill-name}.zip {skill-name}/

End-User Installation

Document these two installation methods for users:

Claude Code:

cp -r skills/{skill-name} ~/.claude/skills/

claude.ai: Add the skill to project knowledge or paste SKILL.md contents into the conversation.

If the skill requires network access, instruct users to add required domains at claude.ai/settings/capabilities.

Troubleshooting

NestJS Best Practices Migration

Issue: Module resolution errors after migration

  • Solution: Ensure tsconfig.json has "moduleResolution": "bundler" and no .js extensions in imports

Issue: Type errors with bun runtime

  • Solution: Install @types/bun matching your bun version, set types to ["bun-types"]

Issue: pnpm commands still being used

  • Solution: Update all CI/CD workflows and scripts to use bun instead of pnpm

Skills Development

Issue: Skill not loading in Claude Code

  • Solution: Verify SKILL.md has valid frontmatter with name and description fields

Issue: Scripts failing with permission errors

  • Solution: Ensure scripts have execute permissions: chmod +x scripts/*.sh

Common Issues

  • Network timeouts: Check firewall rules and domain allowlists
  • Path issues: Use absolute paths when referencing skill scripts
  • Context limits: Keep SKILL.md under 500 lines, use supporting files for detailed docs

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.