Skip to content

Commit 9b44d13

Browse files
authored
docs: add contributing guide (#42)
1 parent d8d8c2b commit 9b44d13

1 file changed

Lines changed: 108 additions & 0 deletions

File tree

CONTRIBUTING.md

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
# 🦄 Contributing to Very Good AI Flutter Plugin
2+
3+
First of all, thank you for taking the time to contribute! 🎉👍 Before you do, please carefully read this guide.
4+
5+
## Getting Started
6+
7+
1. **Fork** the repository and clone your fork locally.
8+
2. Create a new branch from `main` for your work.
9+
3. Open the project in your editor of choice — any text editor works.
10+
11+
## Types of Contributions
12+
13+
| Contribution | Where |
14+
| ------------ | ----- |
15+
| **New skill** | `skills/<skill-name>/SKILL.md` |
16+
| **Improve an existing skill** | Edit the relevant `skills/*/SKILL.md` or `reference.md` |
17+
| **Hooks** | `hooks/` directory |
18+
| **Bug reports & feature requests** | [GitHub Issues](https://github.com/VeryGoodOpenSource/very_good_ai_flutter_plugin/issues) |
19+
20+
## Adding a New Skill
21+
22+
### 1. Create the skill file
23+
24+
Create `skills/<skill-name>/SKILL.md`. The file must begin with YAML frontmatter:
25+
26+
```yaml
27+
---
28+
name: vgv-<skill-name>
29+
description: When this skill should be triggered — be specific.
30+
allowed-tools: Read,Glob,Grep
31+
argument-hint: "[file-or-directory]" # optional
32+
---
33+
```
34+
35+
| Field | Required | Rules |
36+
| ----- | -------- | ----- |
37+
| `name` | Yes | Prefixed with `vgv-`, lowercase letters, numbers, and hyphens only |
38+
| `description` | Yes | Describes when the skill should be triggered |
39+
| `allowed-tools` | Yes | Comma-separated list of tools the skill may use |
40+
| `argument-hint` | No | Placeholder hint shown to the user |
41+
42+
After the frontmatter, structure the file as:
43+
44+
1. **H1 title** — human-readable skill name
45+
2. **Core Standards** — enforced constraints, always first
46+
3. **Content sections** — architecture, code examples, workflows, anti-patterns
47+
48+
### 2. Update `plugin.json` tags
49+
50+
Add relevant keywords to the `keywords` array in `.claude-plugin/plugin.json`.
51+
52+
### 3. Update the README skills table
53+
54+
Add a row to the skills table in `README.md`. The skill name must link to the `SKILL.md` file:
55+
56+
```markdown
57+
| [**Skill Name**](skills/<skill-name>/SKILL.md) | Short description of what the skill covers |
58+
```
59+
60+
### 4. Update `CLAUDE.md` repository structure
61+
62+
Add the new skill directory and files to the repository structure tree in `CLAUDE.md`.
63+
64+
## Skill Writing Guidelines
65+
66+
- **Use clear directives** — no soft language ("consider", "prefer"). Say "Use X" or "Do not use Y".
67+
- **Fence all code blocks** with language identifiers (e.g., ` ```dart `).
68+
- **Provide complete, copy-pasteable snippets** — not fragments.
69+
- **Reference packages by full name** (e.g., `package:mocktail`, not just "mocktail").
70+
- **Show anti-patterns alongside correct patterns** when helpful, so readers understand both what to do and what to avoid.
71+
72+
## CI Checks
73+
74+
Every pull request runs the following checks automatically:
75+
76+
| Check | What it does | Config |
77+
| ----- | ------------ | ------ |
78+
| Spelling | Runs cspell on all `*.md` files | `config/cspell.json` |
79+
| File size | Ensures no file exceeds 50 KB | `scripts/check_large_files.sh` |
80+
| Skill validation | Validates `SKILL.md` frontmatter and structure | `scripts/validate_skills.sh` |
81+
| Manifest validation | Validates `.claude-plugin/plugin.json` | `scripts/validate_plugin_manifest.sh` |
82+
83+
If the spelling check flags a legitimate word, add it to `config/cspell.json` in the `words` array.
84+
85+
## Commit Convention
86+
87+
Use [Conventional Commits](https://www.conventionalcommits.org/) with the format:
88+
89+
```
90+
type(scope): description
91+
```
92+
93+
| Type | When to use | Example |
94+
| ---- | ----------- | ------- |
95+
| `feat` | New skill or feature | `feat: add bloc skill` |
96+
| `fix` | Fix an error or incorrect guidance | `fix: correct GoRouter redirect example` |
97+
| `docs` | Documentation-only change | `docs: add logo to README` |
98+
| `chore` | Maintenance, CI, tooling | `chore: update cspell config` |
99+
| `refactor` | Restructure without changing behavior | `refactor: reorganize testing skill sections` |
100+
| `ci` | CI pipeline changes | `ci: add manifest validation step` |
101+
102+
## Pull Requests
103+
104+
- Branch from `main`.
105+
- Keep PRs focused — **one skill per PR** for new skills.
106+
- Fill out the [PR template](.github/PULL_REQUEST_TEMPLATE.md) completely.
107+
- Ensure all CI checks pass before requesting review.
108+
- Link any related issues in the PR description.

0 commit comments

Comments
 (0)