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

repo-to-skill

v1.7.0

Published

Generate an AI-readable skill from a TypeScript/JavaScript repository

Downloads

1,607

Readme

repo-to-skill

CLI para gerar uma "skill" (mapa + chunks em markdown) a partir de um repositório TypeScript/JavaScript, tornando-o legível por IAs como Claude e Codex sem precisar carregar todos os arquivos.


O que é / Para que serve

repo-to-skill analisa um repositório TS/JS local e gera arquivos markdown estruturados que permitem que assistentes de IA entendam a base de código com eficiência:

  • Menos tokens: apenas os arquivos relevantes, em chunks gerenciáveis.
  • Sem envio para nuvem: toda a análise acontece localmente.
  • Integração direta: instala referências em CLAUDE.md e AGENTS.md.

Requisitos

  • Node.js 20 ou superior
  • macOS ou Linux (Windows não suportado)

Como usar

Execute sem instalação global:

npx repo-to-skill

Ou instale globalmente:

npm install -g repo-to-skill
repo-to-skill

Primeiro uso (projeto sem skill gerada)

Ao rodar repo-to-skill pela primeira vez em um repositório:

  1. O assistente interativo abre com um banner mostrando a versão.
  2. Você escolhe o repositório: diretório atual ou informa um caminho.
  3. O menu exibe:
    • Gerar skill — gera a skill e instala os targets escolhidos
    • Atualizar CLI — verifica e atualiza a ferramenta
    • Ajuda — exibe instruções
    • Sair
  4. Escolha Gerar skill:
    • Selecione os targets (codex, claude ou ambos).
    • Escolha o modo de instalação (force / merge / skip).
    • Confirme o resumo.
  5. O CLI executa:
    • Cria .repo-to-skill/
    • Gera a skill (index, mapa, chunks)
    • Instala os targets selecionados
    • Adiciona .repo-to-skill/ ao .gitignore do repositório automaticamente

Uso recorrente (skill já gerada)

Ao rodar repo-to-skill em um repositório já inicializado, o assistente vai direto para o menu de ações:

  • Atualizar skill — atualiza incrementalmente com base nas mudanças desde a última geração
  • Instalar target — instala referência da skill em CLAUDE.md ou AGENTS.md (targets já instalados aparecem desabilitados)
  • Atualizar CLI — verifica se há nova versão no npm
  • Ajuda
  • Sair

Arquivos gerados

Todos os arquivos são criados dentro do repositório alvo:

.repo-to-skill/
├── manifest.json          # estado interno (não comitar)
└── out/
    ├── index.md           # índice da skill — carregue primeiro
    ├── repo.map.md        # inventário de todos os arquivos
    └── chunks/
        ├── chunk-001.md
        ├── chunk-002.md
        └── ...

O arquivo .repo-to-skill/ é adicionado automaticamente ao .gitignore do repositório na primeira execução.


Instalar targets

Os targets instalam uma referência da skill nos arquivos de contexto de IA:

| Target | Arquivo gerado | Usado por | |--------|---------------|-----------| | codex | AGENTS.md | OpenAI Codex / GPT com agentes | | claude | CLAUDE.md | Claude Code |

O bloco inserido indica onde o índice da skill está localizado. O AI pode então carregar os chunks sob demanda.

Modos de instalação:

  • force — sobrescreve o arquivo existente
  • merge — atualiza apenas o bloco gerenciado (preserva conteúdo fora do bloco)
  • skip — não altera se o arquivo já existir

Atualizar a CLI

Via assistente interativo:

  1. Escolha Atualizar CLI no menu.
  2. O CLI verifica a versão mais recente no npm.
  3. Se houver atualização, oferece executar npm install -g repo-to-skill@latest.

Ou diretamente:

npm install -g repo-to-skill@latest

Limitações

  • Sistema operacional: macOS e Linux apenas. Windows não é suportado.
  • Linguagem: repositórios TypeScript e JavaScript apenas.
  • Sem rede durante geração: build e update são 100% offline. Apenas Atualizar CLI acessa a internet (npm registry).
  • Lockfiles ignorados: pnpm-lock.yaml, yarn.lock, package-lock.json e npm-shrinkwrap.json são sempre excluídos da skill.
  • Binários ignorados: imagens, PDFs, executáveis e outros binários são excluídos automaticamente.

Licença

MIT