🐉
llms.txtをAgent skillsにするCLIを作った
Claude Codeで習作しているのでその中の公開しても大丈夫そうなものはなんとなく出していこう!と言う気持ちで公開してみた。
何をするもの?
llms.txtで提供されるドキュメント(たとえばDatabricksなら https://docs.databricks.com/llms.txt )とかをskillsに仕立て直すのが面倒くさいなと思ったのでそれを作った。
シンプルにパターンマッチでガワだけ作ってあとは自分で直したい、と言う場合はLLMを使わなくてもいいし、とりあえずもう全部いい感じにして欲しいという感じであればLLMである程度綺麗にしてくれたSkillが出てくる。
まあ作ればすぐできると思うんだけど、なんとなくエージェンティックコーディングで大車輪の再発明時代だと聞いたので公開してみた(なんだそれ
GitHubと、Pypiにもあげた
どう使うの?
後は使い方などをざっと。
インストール
pipだけ。
pip install llmstxt2skill
uvなら、
uv pip install llmstxt2skill
で。
コマンド
基本的な使い方はこちら
# Basic usage
llmstxt2skill https://docs.databricks.com/llms.txt
# Preview without writing (dry-run)
llmstxt2skill https://docs.databricks.com/llms.txt --dry-run
# Custom skill name
llmstxt2skill https://docs.databricks.com/llms.txt --name databricks
# Custom output directory
llmstxt2skill https://docs.databricks.com/llms.txt -o ./skills
# Overwrite existing skill
llmstxt2skill https://docs.databricks.com/llms.txt --force
# Check version
llmstxt2skill --version
LLMを使ったエンリッチメントはこちら
# Databricks (default provider)
export DATABRICKS_HOST="https://your-workspace.cloud.databricks.com"
export DATABRICKS_TOKEN="your-token"
llmstxt2skill https://docs.databricks.com/llms.txt --enrich
# OpenAI
export OPENAI_API_KEY="sk-..."
llmstxt2skill https://example.com/llms.txt --enrich --provider openai
# Anthropic
export ANTHROPIC_API_KEY="sk-ant-..."
llmstxt2skill https://example.com/llms.txt --enrich --provider anthropic
# Local LLM (vLLM, Ollama, llama.cpp server)
export OPENAI_BASE_URL="http://localhost:8000"
llmstxt2skill https://example.com/llms.txt --enrich --provider openai-compatible --model llama3
# Specify model explicitly
llmstxt2skill https://example.com/llms.txt --enrich --provider openai --model gpt-4o
# English output
llmstxt2skill https://example.com/llms.txt --enrich --lang en
# Increase max tokens for large llms.txt files
llmstxt2skill https://docs.databricks.com/llms.txt --enrich --max-tokens 20000
以上です。
ご興味あればお使いくださいませ、フィードバックもくださいませ。
ではでは。
Discussion