I Built Stack2Rules: Generate a CLAUDE.md for Your Project Automatically, Looking for Developers to Test It

2026-11-10来源 dev.toEnglish

Hey DEV Community! 👋

I've been working on an open-source Python developer tool called Stack2Rules, and I'm excited to share its first public release.

The idea is simple:

What if you could generate a project-specific CLAUDE.md file automatically, without manually writing instructions for every framework in your application?

That's what Stack2Rules aims to do.

It's now available on GitHub and PyPI, and I'd love feedback from developers who work with Python, JavaScript, TypeScript, and AI-assisted coding tools.

💡 The Problem

AI coding assistants can benefit from clear, project-specific instructions.

But every project is different.

A Django backend has different conventions from a FastAPI application. A Next.js project has different architectural considerations from a React application using a separate backend.

Writing and maintaining these instructions manually takes time.

I wanted a lightweight tool that could inspect a project's declared dependencies and generate a useful starting point.

⚡ Introducing Stack2Rules

Stack2Rules is a zero-runtime-dependency Python CLI that:

  • Detects supported technologies from project dependency manifests.
  • Generates framework-specific instructions in a CLAUDE.md file.
  • Works entirely locally without API calls.
  • Requires no accounts, prompts, or configuration.
  • Produces deterministic Markdown output.
  • Protects existing files from accidental overwriting.

It is an independent open-source project, not an official Anthropic tool.

🛠️ Installation

Stack2Rules requires Python 3.11 or newer.

Install it using pip:

python -m pip install stack2rules 

Navigate to the root of your project and run:

stack2rules 

That's it!

The tool inspects supported dependency manifests and generates a CLAUDE.md file in your project directory.

You can also target another directory:

stack2rules --dir /path/to/project 

Or specify a different output filename:

stack2rules --output CLAUDE.generated.md 

Existing output files are never overwritten.

🔍 How Does It Detect Your Tech Stack?

Stack2Rules examines three root-level project files:

  • package.json
  • requirements.txt
  • pyproject.toml

It identifies supported packages from their declared dependencies and selects appropriate instruction templates.

The current release supports 17 technologies, including:

Python ecosystem: Python, Django, FastAPI, Flask, Pandas, NumPy, Pydantic, SQLAlchemy, and pytest.

JavaScript and web ecosystem: Node.js, React, Next.js, Vue, Express, TypeScript, Tailwind CSS, and Vitest.

For example, a Next.js project using React, TypeScript, and Tailwind CSS can receive dedicated guidance for each recognized technology.

The generated instructions encourage version-aware development rather than assuming which framework version is installed.

🧪 Testing and Validation

Before publishing v1.0.0, I wanted to establish a reproducible baseline.

The repository includes a documented validation record showing:

  • 29 regression tests passed.
  • Successful installation and CLI execution.
  • Verification of generated example outputs.
  • Successful wheel building and isolated installation.
  • A release CI run that passed 12 jobs across Linux, macOS, and Windows using Python 3.11–3.14.
  • Successful PyPI installation and verification of the published package.

These results are encouraging, but they don't replace real-world testing on diverse developer projects.

Full validation details:

Stack2Rules Validation Record

🔐 Privacy and Safety Considerations

Because Stack2Rules examines project manifests, I wanted to keep its behavior limited and predictable.

The tool:

  • Does not execute the project's code.
  • Does not make network or API calls.
  • Does not send telemetry.
  • Does not inspect .env files or private keys.
  • Does not recursively scan the entire repository.
  • Skips unsupported or unsafe manifest inputs.
  • Does not overwrite existing output files.

These are intentional design choices, although the tool is not intended to function as a security sandbox.

📦 Version 1.0.0 Is Available

The first public release is available now.

GitHub Repository:
https://github.com/Shadowsama20/stack2rules

PyPI Package:
https://pypi.org/project/stack2rules/

Version 1.0.0 Release:
https://github.com/Shadowsama20/stack2rules/releases/tag/v1.0.0

The project is released under the MIT license.

🤝 I'm Looking for Developers and Contributors!

This is where I'd really appreciate the DEV Community's help.

I'm particularly interested in feedback about:

1. Real-world compatibility

Does Stack2Rules recognize the technologies in your project correctly?

2. Missing frameworks

Which additional frameworks or tools would make it more useful?

3. Quality of generated instructions

Are the rules helpful, accurate, and sufficiently specific?

4. Edge cases and reliability

Can you identify cases where detection fails, produces misleading rules, or behaves unexpectedly?

5. Code quality and architecture

Are there opportunities to simplify the implementation or improve maintainability?

If you find an issue, please open a GitHub issue with a reproducible example.

Contributions are welcome, including documentation improvements, new framework mappings, test cases, and bug fixes.

Read the Contribution Guide

🌱 What's Next?

My immediate priority is collecting independent feedback and testing Stack2Rules against more real-world projects.

I'd like the next improvements to be driven by problems developers actually encounter, rather than simply adding features without evidence that they're useful.

🙌 Final Thoughts

Stack2Rules is a small open-source project built around a straightforward idea: make it easier to give AI coding assistants useful, stack-specific project instructions.

I'm proud to have reached the first public release, but I know that releasing software is only the beginning.

If you use AI coding assistants, would automatically generated project instructions help your workflow? What would you change about this approach?

Feel free to try Stack2Rules, explore the source code, open an issue, or submit a pull request.

And if you find it useful, consider starring the repository to support the project.

Thanks for reading! 🚀

python #opensource #devtools #showdev

原文:https://www.a8q9.cn/en/article/i-built-stack2rules-generate-a-claude-md-for-your-project-automatically-looking--d2bfa8.html

相关文章