用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/wojons/skills --skill index命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Use when you need comprehensive accessibility auditing including WCAG compliance, legal requirements mapping, and user testing with disabilities
Apply systematic adversarial thinking patterns including devil's advocate, assumption busting, red teaming, and white hat security approaches
A 10-step methodology for building software with AI collaboration - from north star through automated Ralph loop execution with zero human-in-the-loop code writing
基于 SOC 职业分类
正在显示 SKILL.md
| name | index |
| description | Maintain directory organization with index files (_index.md/_index.yaml/_index.json) and consistency prompts (_prompt.md) |
| license | MIT |
| compatibility | opencode |
| metadata | {"audience":"developers","category":"development"} |
Maintain directory organization with index files (_index.md, _index.yaml, _index.json) and consistency prompts (_prompt.md) to save context and ensure file consistency across projects.
Use this skill when:
_index files in directories to document contents and purpose_prompt.md files to guide file creation within directories_index.md)# Directory: src/components/
## Purpose
Reusable UI components for the application.
## Contents
- **Button/** - Interactive button components
- **Form/** - Form elements and validation components
- **Layout/** - Page layout and structural components
- **Modal/** - Dialog and overlay components
- **Navigation/** - Menu and navigation components
## Conventions
- Use TypeScript with React
- Follow atomic design principles
- Include Storybook stories
- Export via index.ts barrel files
## Related Directories
- `src/styles/` - Component styling
- `src/hooks/` - Custom React hooks
- `src/utils/` - Utility functions
## Last Updated
2024-03-15 - Added new Modal components
_index.yaml)directory: src/components/
purpose: Reusable UI components for the application
contents:
- name: Button
description: Interactive button components
type: directory
- name: Form
description: Form elements and validation components
type: directory
- name: Layout
description: Page layout and structural components
type: directory
conventions:
- Use TypeScript with React
- Follow atomic design principles
- Include Storybook stories
related:
-
_index.json){
"directory": "src/components/",
"purpose": "Reusable UI components for the application",
"contents": [
{
"name": "Button",
"description": "Interactive button components",
"type": "directory"
},
{
"name": "Form",
"description": "Form elements and validation components",
"type": "directory"
}
],
"conventions": [
"Use TypeScript with React",
"Follow atomic design principles",
"Include Storybook stories"
],
"related": [
"src/styles/"
_prompt.md)# File Creation Guidelines: src/components/
## When creating new component files in this directory:
### Naming Convention
- Use PascalCase for component names (e.g., `UserProfile.tsx`)
- Use descriptive names that indicate purpose
- Prefix with directory-specific prefixes if needed
### File Structure
ComponentName.tsx # Main component file ComponentName.styles.ts # Component styles (if separate) ComponentName.stories.tsx # Storybook stories ComponentName.test.tsx # Component tests index.ts # Barrel export
### Content Requirements
- Include PropTypes or TypeScript interfaces
- Add JSDoc comments for public APIs
- Follow the existing component patterns
- Include accessibility attributes (aria-*)
### Import/Export Patterns
- Use named exports for components
- Export types/interfaces separately
- Use barrel files (index.ts) for directory exports
### Testing Requirements
- Write unit tests with React Testing Library
- Include accessibility tests
- Test all user interactions
- Mock external dependencies appropriately
### Styling Guidelines
- Use CSS-in-JS (Emotion) for styling
- Follow design system tokens
- Ensure responsive design
- Maintain accessibility color contrast
### Examples
See `Button/` and `Form/` directories for reference implementations.
# Create index files for current directory
npm run index:create -- --format markdown
npm run index:create -- --format yaml
npm run index:create -- --format json
# Create index files recursively
npm run index:create -- --recursive --format markdown
# Update existing index files
npm run index:update -- --directory src/components/
# Generate prompt file
npm run index:prompt -- --directory src/components/
# Validate index consistency
npm run index:validate -- --directory .
# Convert between formats
npm run index:convert -- --from markdown --to yaml
# Interactive index creation
npm run index:interactive
# Generate directory tree with indexes
npm run index:tree -- --depth 3
# Check for missing indexes
npm run index:check -- --directory .
Directory Index Report
──────────────────────────────
Directory: /project/src/components/
Index Files:
✅ _index.md - Present and up to date
✅ _prompt.md - Present and current
⚠️ Button/_index.md - Missing prompt file
❌ Form/_index.md - Stale (last updated 90 days ago)
✅ Layout/_index.md - Present and current
Directory Contents:
- Button/ (5 files, 1 subdirectory)
- Form/ (8 files, 2 subdirectories)
- Layout/ (3 files, 0 subdirectories)
- Modal/ (4 files, 1 subdirectory)
- Navigation/ (6 files, 0 subdirectories)
Index Coverage:
- Directories with index: 5/6 (83%)
- Directories with prompt: 4/6 (67%)
- Average index age: 15 days
- Stale indexes (>30 days): 1
Consistency Check:
✅ Naming conventions followed
✅ File structures consistent
⚠️ Some missing test files
✅ Documentation present
Recommendations:
1. Update Form/_index.md (stale)
2. Add _prompt.md to Button/ directory
3. Consider adding index to Modal/utils/ subdirectory
4. Review test coverage for newer components
Next Actions:
- Run: npm run index:update -- --directory Form/
- Run: npm run index:prompt -- --directory Button/
- Run: npm run index:create -- --directory Modal/utils/