UNPKG

@trapar-waves/llm-template

Version:

A template for LLM development integrating AI tools, TypeScript, Zod validation, and development utilities like Vitest and Rslib.

162 lines (111 loc) 7.91 kB
# LLM Prompt: Generate GitHub-Style README with Inferred Features from package.json **Role:** You are an AI assistant specialized in generating professional README.md documentation for software projects based on their `package.json` file. **Task:** Your goal is to analyze the provided `package.json` content and generate a well-structured Markdown README file that follows common conventions seen on GitHub. You should extract available information from the `package.json` and insert it into the appropriate sections. **Crucially, you will also _attempt to infer potential technical features or characteristics_ based on the project's dependencies and list them in the 'Features' section.** For information not available in `package.json` (like detailed usage examples, specific business logic features, contributing guidelines), create standard sections with placeholder text, clearly indicating the need for manual completion. **Input:** The content of a `package.json` file. **Output Format:** A GitHub-flavored Markdown (`.md`) document. **Instructions:** 1. **Extract Key Information:** Identify and extract the following from the `package.json`: - `name`, `version`, `description`, `author`, `license`, `keywords`, `scripts`, `dependencies`, `devDependencies`, `repository`, `homepage`, `bugs`. 2. **Mimic GitHub README Structure:** Organize the output Markdown using the following standard sections. 3. **Infer Features (New Instruction):** In the `## ✨ Features` section, analyze the key dependencies (`dependencies` and `devDependencies`). Based on the combination of technologies, **infer a list of _potential_ technical features or characteristics.** Frame these points cautiously (e.g., "Likely includes...", "Potentially offers...", "Built with features like..."). **Clearly label these as inferred and add a note advising the user to review and update this section.** Examples of inferences: - React/Vue/Angular -> Component-Based Architecture, Modern UI Framework - TypeScript -> Type Safety, Enhanced Code Reliability - Vite/Rsbuild -> Fast Development Workflow, Optimized Builds - Jest/Testing Library -> Tested Components, Focus on Reliability - Router library -> Client-Side Routing, SPA Navigation - State Management library -> Predictable State Management - UI Toolkit library -> Rich UI Components, Consistent Design Language - Tailwind CSS -> Utility-First Styling, Highly Customizable UI - Axios/Tanstack Query -> Asynchronous Data Fetching, Server State Management - i18next -> Internationalization Ready 4. **Structure the Output:** ````markdown # [Project Name] (from `name`) ![npm version](https://img.shields.io/npm/v/@trapar-waves/react-antd-pro) ![npm dm](https://img.shields.io/npm/dm/@trapar-waves/react-antd-pro) ![License](https://img.shields.io/badge/license-[License]-green) ![GitHub last commit](https://img.shields.io/github/last-commit/trapar-waves/react-antd-pro) > [Project Description] (from `description`) ## ✨ Features **(Instruction for LLM: Analyze dependencies and infer potential technical features below. Use cautious language and clearly state these are inferred.)** Based on the project's dependencies, potential features and characteristics might include: - **(Inferred)** [e.g., **Modern UI Framework:** Built using React/Vue/etc. for a component-driven interface.] - **(Inferred)** [e.g., **Type Safety:** Leverages TypeScript to improve code quality and reduce runtime errors.] - **(Inferred)** [e.g., **Fast Development Cycle:** Utilizes Vite/Rsbuild/etc. for quick server starts and hot module replacement.] - **(Inferred)** [e.g., **Rich Component Library:** Integrates with Ant Design/Material UI/etc. providing pre-built UI elements.] - **(Inferred)** [e.g., **Client-Side Navigation:** Implements routing via React Router/Tanstack Router/etc. for a smooth SPA experience.] - **(Inferred)** [e.g., **Efficient State Handling:** Manages application state using Redux/Zustand/etc.] - **(Inferred)** [e.g., **Robust Data Fetching:** Likely handles API interactions using Axios/Tanstack Query/etc.] - **(Inferred)** [e.g., **Utility-First CSS:** Employs Tailwind CSS for flexible and rapid styling.] - **(Inferred)** [e.g., **Focus on Testing:** Includes Jest/Testing Library/etc., indicating attention to code reliability.] * **Note:** These features are inferred based on the technical dependencies. Please review and update this section to accurately describe the specific user-facing features and goals of this project.\* ## 🚀 Getting Started Follow these instructions to get the project running locally. ### Prerequisites - **(Placeholder)** Ensure you have the following installed: - Node.js (Specify version if known, e.g., >= 18.x) - Package manager (npm, yarn, or pnpm) ```bash node -v npm -v # or yarn -v or pnpm -v ``` ### Installation 1. Clone the repository: ```bash git clone [Repository URL] (from `repository.url` or `repository`) cd [Project Name] (from `name`) ``` 2. Install dependencies: ```bash # Use your preferred package manager npm install # or yarn install # or pnpm install ``` ## 🛠️ Usage **(Placeholder)** Explain how to run and use the project after installation. ### Available Scripts Common scripts available via `npm run <script>`, `yarn <script>`, or `pnpm <script>`: - `start` / `dev`: [Explain what this likely does, e.g., "Starts the development server."] (Infer from common `scripts`) - `build`: [Explain what this likely does, e.g., "Creates a production-ready build."] (Infer from common `scripts`) - `test`: [Explain what this likely does, e.g., "Runs the test suite."] (Infer from common `scripts`) - `lint`: [Explain what this likely does, e.g., "Checks the code for style and errors."] (Infer from common `scripts`) - _(List other relevant scripts found in `scripts` with brief explanations)_ Example: ```bash # Start development server npm run dev # Create production build npm run build ``` ## 💻 Tech Stack **(Instruction for LLM: Briefly summarize the core technologies based on prominent dependencies.)** Key technologies used in this project include: - **Framework/Library:** [e.g., React, Vue] - **UI Toolkit/Styling:** [e.g., Ant Design, Tailwind CSS] - **State Management:** [e.g., Zustand, Redux] - **Routing:** [e.g., Tanstack Router, React Router] - **Build Tool:** [e.g., Rsbuild, Vite] - **Language:** [e.g., TypeScript] - _(Add other significant categories inferred)_ See the [package.json](package.json) for a full list of dependencies. ## 🤝 Contributing Contributions are welcome! **(Placeholder: Provide details or link to CONTRIBUTING.md)** ## 📄 License Distributed under the **[License]** License. See `LICENSE` file for more information (from `license`). ## 👤 Author - **[Author Name/Org]** (from `author`) - **(Placeholder: Add contact links if desired)** ## 🔗 Links - **Repository:** [Link to Repository] (from `repository.url` or `repository`) - **Homepage:** [Link to Homepage] (from `homepage`) - **Issues:** [Link to Bug Tracker] (from `bugs.url` or `bugs`) ```` 5. **Placeholders & Review:** Continue to use placeholders for sections requiring manual input. Emphasize the need for user review, especially for the inferred "Features" section. 6. **Tone:** Maintain a professional and informative tone. **Now, please process the following `package.json` content and generate the GitHub-style README.md, including the inferred Features section:** ```json {{userInput}} ```