Skip to content

Commit 7eb7518

Browse files
committed
feat: LeanCode AI plugins marketplace
Public marketplace of LeanCode's shared Claude Code plugins, focused on Flutter development. Ships 13 plugins via .claude-plugin/marketplace.json: lean-core (entry point + contribution helper) and 12 flutter-* plugins. Each is a self-contained directory of skills; convention guidance ships as reference material under skills/<plugin>-usage/references/, loaded on demand by the routing skill. 22 skills, 22 reference files. A Go structure validator (cmd/validate-plugins) checks manifests, marketplace registration, and skill layout; CI runs it plus Go fmt/lint.
0 parents  commit 7eb7518

94 files changed

Lines changed: 4098 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude-plugin/marketplace.json

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
{
2+
"$schema": "https://json.schemastore.org/claude-code-marketplace.json",
3+
"name": "leancode-ai-plugins",
4+
"owner": {
5+
"name": "LeanCode"
6+
},
7+
"metadata": {
8+
"description": "LeanCode's Claude Code plugins for Flutter development.",
9+
"version": "0.1.0"
10+
},
11+
"plugins": [
12+
{
13+
"name": "lean-core",
14+
"source": "./plugins/lean-core",
15+
"description": "Entry point for the LeanCode AI plugins marketplace. Explains what's available and helps contributors open PRs to add or improve plugins.",
16+
"skills": [
17+
"./skills/lean-core-usage",
18+
"./skills/lean-contribute"
19+
]
20+
},
21+
{
22+
"name": "flutter-localization",
23+
"source": "./plugins/flutter-localization",
24+
"description": "LeanCode Flutter localization guidance for ARB, POEditor, and l10n(context) workflows.",
25+
"skills": [
26+
"./skills/flutter-localization-usage",
27+
"./skills/poe2arb-workflow"
28+
]
29+
},
30+
{
31+
"name": "flutter-leancode-architecture",
32+
"source": "./plugins/flutter-leancode-architecture",
33+
"description": "LeanCode Flutter architecture standards for project structure, error handling, and logging.",
34+
"skills": [
35+
"./skills/flutter-leancode-architecture-usage",
36+
"./skills/review-leancode-arch",
37+
"./skills/scaffold-feature"
38+
]
39+
},
40+
{
41+
"name": "flutter-di",
42+
"source": "./plugins/flutter-di",
43+
"description": "LeanCode Flutter dependency injection guidance using the provider package (page-scoped and global providers, AsyncLoader).",
44+
"skills": [
45+
"./skills/flutter-di-usage"
46+
]
47+
},
48+
{
49+
"name": "flutter-navigation",
50+
"source": "./plugins/flutter-navigation",
51+
"description": "LeanCode Flutter navigation guidance for auto_route and go_router with typed routes, route organization, guards, shells, and deep links.",
52+
"skills": [
53+
"./skills/flutter-navigation-usage"
54+
]
55+
},
56+
{
57+
"name": "flutter-analytics",
58+
"source": "./plugins/flutter-analytics",
59+
"description": "LeanCode Flutter analytics guidance for feature-level IDs, page tracking, clickable elements, and analytics review/scaffolding workflows.",
60+
"skills": [
61+
"./skills/flutter-analytics-usage",
62+
"./skills/review-analytics-coverage",
63+
"./skills/scaffold-analytics-ids"
64+
]
65+
},
66+
{
67+
"name": "flutter-bloc",
68+
"source": "./plugins/flutter-bloc",
69+
"description": "LeanCode Flutter BLoC guidance for state management, cubit patterns, and presentation side effects.",
70+
"skills": [
71+
"./skills/flutter-bloc-usage",
72+
"./skills/flutter-context-watch-instead-of-top-builder"
73+
]
74+
},
75+
{
76+
"name": "flutter-cubit-utils",
77+
"source": "./plugins/flutter-cubit-utils",
78+
"description": "LeanCode cubit-utils base classes (QueryCubit, PaginatedQueryCubit, RequestCubit) and canonical cubit recipes for lists, details, and actions.",
79+
"skills": [
80+
"./skills/flutter-cubit-utils-usage"
81+
]
82+
},
83+
{
84+
"name": "flutter-forms",
85+
"source": "./plugins/flutter-forms",
86+
"description": "LeanCode Flutter forms guidance based on leancode_forms, form cubits, and validation behavior.",
87+
"skills": [
88+
"./skills/flutter-forms-usage"
89+
]
90+
},
91+
{
92+
"name": "flutter-cqrs",
93+
"source": "./plugins/flutter-cqrs",
94+
"description": "LeanCode Flutter CQRS guidance for contracts, data-access patterns, and client-side command/query usage.",
95+
"skills": [
96+
"./skills/flutter-cqrs-usage",
97+
"./skills/data-access"
98+
]
99+
},
100+
{
101+
"name": "flutter-ui",
102+
"source": "./plugins/flutter-ui",
103+
"description": "LeanCode Flutter UI guidance for Figma-driven implementation and design-system usage.",
104+
"skills": [
105+
"./skills/flutter-ui-usage",
106+
"./skills/ui"
107+
]
108+
},
109+
{
110+
"name": "flutter-patrol",
111+
"source": "./plugins/flutter-patrol",
112+
"description": "LeanCode Patrol E2E testing guidance (Modules/System/ApiClients, keys conventions) plus Patrol MCP setup for AI-assisted test development.",
113+
"skills": [
114+
"./skills/flutter-patrol-usage"
115+
]
116+
},
117+
{
118+
"name": "flutter-marionette",
119+
"source": "./plugins/flutter-marionette",
120+
"description": "LeanCode Marionette MCP setup and usage — runtime interaction with a live Flutter debug app for AI-driven exploration, smoke verification, and UI debugging.",
121+
"skills": [
122+
"./skills/flutter-marionette-usage"
123+
]
124+
}
125+
]
126+
}

.github/workflows/lint.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Lint
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [main]
7+
workflow_dispatch:
8+
9+
jobs:
10+
go:
11+
name: Go formatting and linting
12+
runs-on: ubuntu-latest
13+
timeout-minutes: 5
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
18+
- name: Setup Go
19+
uses: actions/setup-go@v5
20+
with:
21+
go-version-file: go.mod
22+
23+
- name: Check Go formatting
24+
run: test -z "$(gofmt -l cmd internal)"
25+
26+
- name: Lint Go
27+
uses: golangci/golangci-lint-action@v9
28+
with:
29+
args: ./...
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Validate plugins
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [main]
7+
workflow_dispatch:
8+
9+
jobs:
10+
validate:
11+
name: Structure checks
12+
runs-on: ubuntu-latest
13+
timeout-minutes: 5
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
18+
- name: Setup Go
19+
uses: actions/setup-go@v5
20+
with:
21+
go-version-file: go.mod
22+
23+
- name: Test Go tooling
24+
run: go test ./...
25+
26+
- name: Validate plugin structure
27+
run: go run ./cmd/validate-plugins

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.claude/
2+
.idea

.golangci.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
version: "2"
2+
3+
run:
4+
timeout: 5m
5+
6+
linters:
7+
default: standard

AGENTS.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# AGENTS.md
2+
3+
## Purpose
4+
5+
LeanCode's shared AI plugins for Claude Code, focused on Flutter development.
6+
7+
## Repository layout
8+
9+
- `.claude-plugin/` holds the Claude Code marketplace metadata.
10+
- `plugins/<plugin-name>/` contains one self-contained plugin.
11+
- Each plugin contains `skills/`, and optionally `.mcp.json` if it drives an MCP server.
12+
- Each plugin should have its own `README.md` describing scope and assets.
13+
14+
Claude Code also documents support for per-plugin `agents/`, `commands/`, and `hooks/` directories. No plugin in this repo currently uses them — treat them as not-yet-exercised.
15+
16+
## Working conventions
17+
18+
- Keep plugins self-contained and independently installable.
19+
- Prefer minimal, documented manifest fields over convenience metadata unless Claude Code clearly requires more.
20+
- When adding a skill, include the required frontmatter (`name`, `description`) so marketplace parsing keeps working.
21+
- Update the plugin `README.md` when adding a new capability.
22+
- Avoid coupling shared content to local-only files or directories.
23+
24+
## Sources of truth
25+
26+
- **Plugin list**`.claude-plugin/marketplace.json`. Read it to enumerate plugins; do not maintain a separate list here or in skill bodies.
27+
- **Supported clients** — the "Supported clients" section of the root `README.md`. Read it to enumerate clients.
28+
29+
When a plugin is added, removed, or renamed, update `.claude-plugin/marketplace.json` and the grouped overview in the root README.
30+
31+
## Skills and reference material
32+
33+
Everything a plugin ships is a skill. A skill is a directory `skills/<skill-name>/` with a `SKILL.md` entrypoint and optional supporting files alongside it.
34+
35+
- **`SKILL.md`** — required. YAML frontmatter (`name`, `description`) plus a concise body. The `description` is always in context and is what makes Claude load the skill; the body loads only when the skill fires. Keep the body under ~500 lines.
36+
- **`references/*.md`** — optional supporting files holding detailed conventions, patterns, and domain knowledge. They load only when `SKILL.md` points at them, so long reference material costs nothing until needed. This is where the LeanCode coding conventions live (formerly the per-plugin rule files).
37+
- Every plugin ships a `<plugin-name>-usage/SKILL.md` routing skill. Convention-style guidance for the plugin lives in `skills/<plugin-name>-usage/references/`, and `SKILL.md` lists those files under a "Reach for these references" section so Claude knows when to load each.
38+
39+
Claude Code has no separate "rules" concept for plugins — `plugin.json` recognizes no `rules` key, and a `CLAUDE.md` at the plugin root is not loaded. Ship guidance as skills and their reference files.
40+
41+
## Local checks
42+
43+
Validate plugin structure locally with Go:
44+
45+
```
46+
go run ./cmd/validate-plugins
47+
```
48+
49+
CI runs the same structure validation plus Go formatting/lint on every PR. After pushing, watch CI with `gh pr checks <pr-number>`.
50+
51+
## Platform notes
52+
53+
- Skills live inside each plugin directory (`./skills/`), each with `SKILL.md` and optional `references/`.
54+
- Plugin manifests are thin: `.claude-plugin/plugin.json` points `skills` at `./skills/`. It carries no `rules` key — Claude Code does not recognize one.

CLAUDE.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# CLAUDE.md
2+
3+
See [AGENTS.md](AGENTS.md). All repository-wide context, conventions, and sources of truth live there.

CONTRIBUTING.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Contributing
2+
3+
Contributing to the LeanCode AI plugins is intentionally light.
4+
5+
The guided path is the [`lean-core`](plugins/lean-core/) plugin: run **`/lean-contribute`** and it asks what kind of change you have in mind (tweak, new skill or rule, new plugin), shows the plugin shape, and prints the exact `git`/`gh` steps. It is the canonical, always-current contributor reference — prefer it over this file.
6+
7+
If you'd rather work unguided:
8+
9+
1. Clone the repo and make your change under `plugins/<plugin-name>/` — edit or add `skills/<skill>/SKILL.md` (and any `skills/<skill>/references/*.md`), and register the plugin in [`.claude-plugin/marketplace.json`](.claude-plugin/marketplace.json).
10+
2. Validate structure locally: `go run ./cmd/validate-plugins`.
11+
3. Open a PR. CI validates structure on every PR.
12+
13+
Plugin shape, skill and rule conventions, and other requirements live in [`AGENTS.md`](AGENTS.md).
14+
15+
This repo currently ships LeanCode's Flutter plugins; Flutter contributions are welcome.

README.md

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# LeanCode AI Plugins
2+
3+
LeanCode's shared AI plugins for Claude Code, focused on Flutter development.
4+
5+
## Supported clients
6+
7+
- **Claude Code** — installed via the LeanCode plugin marketplace in Claude Code.
8+
9+
## Install
10+
11+
These plugins are distributed as a Claude Code **plugin marketplace**. Installing is a two-step process — add the marketplace once, then install the plugins you want. You do not need to clone this repo for day-to-day usage. For the full reference, see Claude Code's [Discover and install plugins](https://code.claude.com/docs/en/discover-plugins) docs.
12+
13+
### 1. Add the marketplace
14+
15+
In Claude Code, add this repository as a marketplace by its GitHub `owner/repo`:
16+
17+
```
18+
/plugin marketplace add leancodepl/ai-plugins
19+
```
20+
21+
This registers the catalog so you can browse it — nothing is installed yet. (The full git URL works too: `/plugin marketplace add https://github.com/leancodepl/ai-plugins.git`.)
22+
23+
### 2. Install the plugins you need
24+
25+
Browse the catalog with `/plugin` (the **Discover** tab), or install directly by name. Plugins install from the `leancode-ai-plugins` marketplace:
26+
27+
```
28+
/plugin install flutter-bloc@leancode-ai-plugins
29+
```
30+
31+
Pick only the plugins that match your project — each is independently installable. After installing, run `/reload-plugins` to activate them.
32+
33+
> **Tip:** Install [`lean-core`](plugins/lean-core/) first and run `/lean-core-usage` for a guided tour of the whole marketplace.
34+
35+
### Team setup (optional)
36+
37+
To have Claude Code prompt collaborators to install the marketplace automatically, add it to your project's `.claude/settings.json`:
38+
39+
```json
40+
{
41+
"extraKnownMarketplaces": {
42+
"leancode-ai-plugins": {
43+
"source": {
44+
"source": "github",
45+
"repo": "leancodepl/ai-plugins"
46+
}
47+
}
48+
}
49+
}
50+
```
51+
52+
### Per-plugin setup
53+
54+
Most plugins are pure rules and skills with no setup. A few need one-time tooling or MCP setup — finish it from the plugin's `README.md`:
55+
56+
- [`flutter-patrol`](plugins/flutter-patrol/) - Patrol CLI and Patrol MCP
57+
- [`flutter-marionette`](plugins/flutter-marionette/) - Marionette MCP and app-side binding
58+
59+
## Available plugins
60+
61+
### Getting started
62+
63+
- [`lean-core`](plugins/lean-core/) - marketplace entry point: `/lean-core-usage` explains what's available, `/lean-contribute` walks you through opening a PR
64+
65+
### Project foundations
66+
67+
- [`flutter-leancode-architecture`](plugins/flutter-leancode-architecture/) - project structure, error handling, logging, plus architecture review and feature scaffolding skills
68+
- [`flutter-di`](plugins/flutter-di/) - `provider`-based dependency injection, page-root providers, `GlobalProviders`, and async initialization patterns
69+
- [`flutter-navigation`](plugins/flutter-navigation/) - `auto_route` and `go_router`, typed routes, route guards, route tree organization, and deep links
70+
- [`flutter-analytics`](plugins/flutter-analytics/) - analytics IDs, page/button tracking, plus skills to scaffold IDs and review coverage
71+
- [`flutter-localization`](plugins/flutter-localization/) - ARB workflows, POEditor, `poe2arb`, and `l10n(context)`
72+
73+
### State and data
74+
75+
- [`flutter-bloc`](plugins/flutter-bloc/) - BLoC/Cubit conventions, state modeling, presentation side effects, `bloc_presentation`, and `flutter_hooks`
76+
- [`flutter-cubit-utils`](plugins/flutter-cubit-utils/) - `QueryCubit`, `PaginatedQueryCubit`, `RequestCubit`, and recipes for lists, details, and actions
77+
- [`flutter-cqrs`](plugins/flutter-cqrs/) - CQRS contracts, repositories, direct `cqrs.run` / `cqrs.get` usage, and CQRS-backed cubits
78+
- [`flutter-forms`](plugins/flutter-forms/) - `leancode_forms`, validation behavior, naming conventions, and form cubit patterns
79+
80+
### UI and verification
81+
82+
- [`flutter-ui`](plugins/flutter-ui/) - design-system-driven UI, loading/error patterns, localized presentation text, and UI implementation checklists
83+
- [`flutter-patrol`](plugins/flutter-patrol/) - Patrol test architecture, key conventions, and Patrol MCP workflow for AI-assisted E2E work
84+
- [`flutter-marionette`](plugins/flutter-marionette/) - runtime interaction with a live debug app through Marionette MCP for exploration, smoke checks, and UI debugging
85+
86+
### Every plugin has a `-usage` skill
87+
88+
Once a plugin is installed, it exposes a `/<plugin-name>-usage` skill — for example `/flutter-bloc-usage`, `/flutter-cqrs-usage`, `/flutter-ui-usage`. Run it to see what the plugin covers, its conventions, and example prompts to try next. It's the fastest way to learn a plugin without reading its full `README.md`. If you're not sure where to begin, run `/lean-core-usage` for a tour of the whole marketplace.
89+
90+
## Repo layout
91+
92+
- `plugins/<plugin-name>/` - one self-contained plugin
93+
- `plugins/<plugin-name>/skills/` - skills the plugin ships
94+
- `plugins/<plugin-name>/skills/<skill>/references/` - supporting reference material a skill loads on demand
95+
- `plugins/<plugin-name>/.claude-plugin/` - plugin manifest
96+
- `.claude-plugin/marketplace.json` - marketplace index
97+
98+
## Contributing
99+
100+
If you are interested in contributing, please see [`CONTRIBUTING.md`](CONTRIBUTING.md)

cmd/validate-plugins/main.go

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package main
2+
3+
import (
4+
"flag"
5+
"fmt"
6+
"os"
7+
8+
"github.com/leancodepl/ai-plugins/internal/pluginvalidation"
9+
)
10+
11+
func main() {
12+
repoRoot := flag.String("repo-root", ".", "path to the ai-plugins repository root")
13+
flag.Parse()
14+
15+
report := pluginvalidation.Validate(*repoRoot)
16+
if report.OK() {
17+
fmt.Printf("OK: plugin structure is valid (%d plugin(s) checked).\n", report.PluginCount)
18+
return
19+
}
20+
21+
fmt.Fprintln(os.Stderr, "FAIL: plugin structure has errors:")
22+
for _, err := range report.Errors {
23+
fmt.Fprintf(os.Stderr, " - %s\n", err)
24+
}
25+
fmt.Fprintf(os.Stderr, "\n%d issue(s) found.\n", len(report.Errors))
26+
os.Exit(1)
27+
}

0 commit comments

Comments
 (0)