@pymodel/niblet 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +57 -42
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,8 +5,6 @@
|
|
|
5
5
|
</picture>
|
|
6
6
|
</p>
|
|
7
7
|
|
|
8
|
-
<h1 align="center">Niblet MCP</h1>
|
|
9
|
-
|
|
10
8
|
<p align="center">Real screen references and a design skill, for coding agents that build UI.</p>
|
|
11
9
|
|
|
12
10
|
<p align="center">
|
|
@@ -27,34 +25,44 @@
|
|
|
27
25
|
By <a href="https://github.com/elkaix">elkaix</a> for <a href="https://github.com/PyModel">PyModel</a>
|
|
28
26
|
</p>
|
|
29
27
|
|
|
30
|
-
|
|
28
|
+
A coding agent building UI gets two things here: a design skill that keeps it working from your product rather than a generic template, and real screen references from the [Niblet](https://niblet.com) catalogue when a specific visual question is still open.
|
|
31
29
|
|
|
32
|
-
The skill works
|
|
30
|
+
The skill works alone. The server is optional and needs a token.
|
|
33
31
|
|
|
34
|
-
##
|
|
32
|
+
## Install the skill
|
|
35
33
|
|
|
36
|
-
|
|
34
|
+
```sh
|
|
35
|
+
npx skills add PyModel/niblet-skill-mcp --skill niblet -y
|
|
36
|
+
```
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
Or copy it yourself, keeping `references/`, `agents/`, `LICENSE`, and `NOTICE` alongside it:
|
|
39
|
+
|
|
40
|
+
```sh
|
|
41
|
+
cp -r skill/niblet ~/.claude/skills/niblet
|
|
42
|
+
```
|
|
42
43
|
|
|
43
|
-
|
|
44
|
-
|
|
44
|
+
Then ask for it by name:
|
|
45
|
+
|
|
46
|
+
> Use Niblet to design the checkout empty and error states.
|
|
45
47
|
|
|
46
|
-
The
|
|
48
|
+
The [workflow](skill/niblet/SKILL.md) settles the screen's job, primary action, hierarchy, existing tokens, real states, and acceptance criteria before writing anything. It finishes by rendering the surface and exercising it, so a green build on its own does not count as a pass.
|
|
47
49
|
|
|
48
|
-
## Connect
|
|
50
|
+
## Connect the server
|
|
49
51
|
|
|
50
|
-
|
|
52
|
+
Pick one. Hosted, if your host speaks HTTP MCP:
|
|
51
53
|
|
|
52
54
|
```sh
|
|
53
55
|
claude mcp add --transport http niblet https://api.niblet.com/mcp \
|
|
54
56
|
--header "Authorization: Bearer $NIBLET_TOKEN"
|
|
55
57
|
```
|
|
56
58
|
|
|
57
|
-
|
|
59
|
+
Local over stdio, via the Claude Code CLI:
|
|
60
|
+
|
|
61
|
+
```sh
|
|
62
|
+
claude mcp add niblet --env NIBLET_TOKEN=$NIBLET_TOKEN -- npx -y @pymodel/niblet
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Or the equivalent in any host's MCP config file:
|
|
58
66
|
|
|
59
67
|
```json
|
|
60
68
|
{
|
|
@@ -68,40 +76,46 @@ To run it locally over stdio instead, add this to your host's MCP config. Node.j
|
|
|
68
76
|
}
|
|
69
77
|
```
|
|
70
78
|
|
|
71
|
-
|
|
79
|
+
Node.js 24.15+; npx fetches the package on first launch. Get a token from [niblet.com/docs](https://niblet.com/docs) and keep it in your host's environment, never in a committed file or a chat message.
|
|
72
80
|
|
|
73
|
-
|
|
74
|
-
claude mcp add niblet --env NIBLET_TOKEN=$NIBLET_TOKEN -- npx -y @pymodel/niblet
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
Saving the config does not register the server — check the tool list your host actually reports.
|
|
81
|
+
Saving the config does not register the server, so confirm it worked. `niblet_status` reports the configured origins, whether a usable token is present, and whether the API answers:
|
|
78
82
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
83
|
+
```
|
|
84
|
+
Token: present (44 characters, not shown).
|
|
85
|
+
Documents: 5/5 readable (niblet://skill, …).
|
|
86
|
+
API check: OK
|
|
87
|
+
```
|
|
82
88
|
|
|
83
|
-
##
|
|
89
|
+
## Tools
|
|
84
90
|
|
|
85
|
-
|
|
91
|
+
| Tool | Use it for | Token |
|
|
92
|
+
| --- | --- | --- |
|
|
93
|
+
| `find_ui_references` | One concrete unresolved question about a layout, state, or interaction. Returns one to three real screens as inline images. | yes |
|
|
94
|
+
| `find_ui_materials` | A font, icon, or animated icon role your design system does not already cover. Returns the recorded license with each result. | yes |
|
|
95
|
+
| `niblet_help` | "What can Niblet do?", or choosing between commands. Lists the four surface modes and every command; pass `command` for one entry. | no |
|
|
96
|
+
| `niblet_status` | Diagnosing the connection before concluding the catalogue is empty. Never prints the token. | no |
|
|
86
97
|
|
|
87
|
-
|
|
98
|
+
The two catalogue tools match the hosted service exactly. `niblet_help` and `niblet_status` are local-only.
|
|
88
99
|
|
|
89
|
-
|
|
90
|
-
npx skills add PyModel/niblet-skill-mcp --skill niblet -y
|
|
91
|
-
```
|
|
100
|
+
## Resources
|
|
92
101
|
|
|
93
|
-
|
|
102
|
+
The bundled documents, served without a token. Cross-links between them are rewritten to these URIs, so an agent reading one can follow every reference.
|
|
94
103
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
104
|
+
| URI | Contents |
|
|
105
|
+
| --- | --- |
|
|
106
|
+
| `niblet://skill` | The design workflow: modes, contract, state coverage, finish gate |
|
|
107
|
+
| `niblet://skill/commands` | Every command, its scope, and what completion means |
|
|
108
|
+
| `niblet://skill/connection` | Installing, invoking, and diagnosing the tools |
|
|
109
|
+
| `niblet://skill/evidence` | When to pull an external reference, and how to use one |
|
|
110
|
+
| `niblet://skill/native` | Platform constraints and the native finish gate |
|
|
100
111
|
|
|
101
|
-
|
|
102
|
-
> Run a niblet-skill review of the settings screen.
|
|
112
|
+
## Configuration
|
|
103
113
|
|
|
104
|
-
|
|
114
|
+
| Variable | Purpose |
|
|
115
|
+
| --- | --- |
|
|
116
|
+
| `NIBLET_TOKEN` | Required by the two catalogue tools. |
|
|
117
|
+
| `NIBLET_API_ORIGIN` | Retarget at a local deployment. Unset for production. |
|
|
118
|
+
| `NIBLET_MEDIA_ORIGIN` | Same, for images. Unset for production. |
|
|
105
119
|
|
|
106
120
|
## Contributing
|
|
107
121
|
|
|
@@ -110,11 +124,12 @@ git clone https://github.com/PyModel/niblet-skill-mcp
|
|
|
110
124
|
cd niblet-skill-mcp
|
|
111
125
|
npm ci --ignore-scripts
|
|
112
126
|
cp .env.example .env # then put your token in NIBLET_TOKEN
|
|
127
|
+
npm test
|
|
113
128
|
```
|
|
114
129
|
|
|
115
|
-
`npm test` covers the tool contract and its failure boundaries. For anything touching startup or configuration, also connect a real MCP client and confirm the tool list and every `niblet://skill` resource
|
|
130
|
+
`npm test` covers the tool contract and its failure boundaries. For anything touching startup or configuration, also connect a real MCP client and confirm the reported tool list and every `niblet://skill` resource. A resource that registers but never appears in `resources/list` is the failure unit tests cannot catch. For documentation, check that `npm pack --dry-run` still ships what you expect.
|
|
116
131
|
|
|
117
|
-
[AGENTS.md](AGENTS.md) has the
|
|
132
|
+
[AGENTS.md](AGENTS.md) has the working agreement for pointing a coding agent at this repository.
|
|
118
133
|
|
|
119
134
|
## License
|
|
120
135
|
|