codex-arsenal 0.2.0 → 0.3.0
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/CODEX.md +16 -3
- package/README.md +130 -114
- package/bin/cli.js +8 -5
- package/docs/codex-plugin-distribution.md +54 -0
- package/docs/npm-publishing.md +35 -0
- package/lib/installer.js +41 -12
- package/lib/manifest.js +1 -8
- package/package.json +4 -4
- package/CLAUDE.md +0 -15
package/CODEX.md
CHANGED
|
@@ -91,7 +91,20 @@ Weak criteria ("make it work") require constant clarification.
|
|
|
91
91
|
|
|
92
92
|
---
|
|
93
93
|
|
|
94
|
-
## 6.
|
|
94
|
+
## 6. Token Budgeting
|
|
95
|
+
|
|
96
|
+
**Spend context only where it changes the decision.**
|
|
97
|
+
|
|
98
|
+
- Start with filenames, symbols, and short snippets before reading full files.
|
|
99
|
+
- Prefer `rg` and targeted search over broad recursive reads.
|
|
100
|
+
- Summarize long outputs immediately: key facts, file paths, line numbers, open questions.
|
|
101
|
+
- Do not paste large logs back to the user. Quote only the failing line or smallest useful excerpt.
|
|
102
|
+
- Reuse already-loaded context instead of re-reading the same files.
|
|
103
|
+
- When handing off, compress to: goal, changed files, commands run, verification status, next risk.
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## 7. Context Awareness
|
|
95
108
|
|
|
96
109
|
**Codex has a limited context window — use it wisely.**
|
|
97
110
|
|
|
@@ -102,7 +115,7 @@ Weak criteria ("make it work") require constant clarification.
|
|
|
102
115
|
|
|
103
116
|
---
|
|
104
117
|
|
|
105
|
-
##
|
|
118
|
+
## 8. Tool Use Discipline
|
|
106
119
|
|
|
107
120
|
**Every tool call has a cost. Make them count.**
|
|
108
121
|
|
|
@@ -118,4 +131,4 @@ Weak criteria ("make it work") require constant clarification.
|
|
|
118
131
|
- Diffs contain fewer unnecessary changes
|
|
119
132
|
- Fewer rewrites due to overcomplication
|
|
120
133
|
- Clarifying questions come **before** implementation, not after mistakes
|
|
121
|
-
- Agentic runs complete tasks end-to-end without silent failures or scope creep
|
|
134
|
+
- Agentic runs complete tasks end-to-end without silent failures or scope creep
|
package/README.md
CHANGED
|
@@ -1,173 +1,189 @@
|
|
|
1
1
|
# Codex-Arsenal
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
> 플러그인 · 스킬 · 워크플로 · 설정 · 프롬프트 큐레이션 레포지토리.
|
|
3
|
+
Practical building blocks for working with OpenAI Codex.
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
Codex-Arsenal is not an awesome list. It is a small, installable collection of Codex guidelines, skills, prompts, workflows, configs, and plugin sketches that can be copied into real projects.
|
|
7
6
|
|
|
8
|
-
##
|
|
7
|
+
## Install
|
|
9
8
|
|
|
10
|
-
|
|
11
|
-
"vanilla setup만으로는 부족하다"고 느낀 개발자들을 위한 실용 자료 모음입니다.
|
|
9
|
+
Run the CLI without installing it globally:
|
|
12
10
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
- setup → 사용법 → 주의사항까지 한 곳에서 해결
|
|
17
|
-
- 개인 개발자 / 소규모 팀 모두를 대상으로 함
|
|
18
|
-
- Claude Code 스타일의 agentic workflow에 최적화
|
|
11
|
+
```bash
|
|
12
|
+
npx codex-arsenal list
|
|
13
|
+
```
|
|
19
14
|
|
|
20
|
-
|
|
21
|
-
> AI 코딩 도구가 처음이라면 [공식 문서](https://platform.openai.com/docs/guides/code)부터 시작하세요.
|
|
15
|
+
Install the default item set into the current project:
|
|
22
16
|
|
|
23
|
-
|
|
17
|
+
```bash
|
|
18
|
+
npx codex-arsenal init --yes
|
|
19
|
+
```
|
|
24
20
|
|
|
25
|
-
|
|
21
|
+
Install specific items:
|
|
26
22
|
|
|
23
|
+
```bash
|
|
24
|
+
npx codex-arsenal get codex-md skill-publishing-npm-packages
|
|
27
25
|
```
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
├── configs/ # .codex, VSCode, zsh, tmux 등 설정 파일
|
|
34
|
-
├── references/ # 논문 · 블로그 · 주목할 GitHub 레포 링크
|
|
35
|
-
├── examples/ # 실전 데모 및 before/after 예제
|
|
36
|
-
└── README.md
|
|
26
|
+
|
|
27
|
+
Install into another directory:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
npx codex-arsenal get codex-md --dir ./my-project
|
|
37
31
|
```
|
|
38
32
|
|
|
39
|
-
|
|
33
|
+
On Windows or when running from a package directory with the same name, this form is the most reliable:
|
|
40
34
|
|
|
41
|
-
|
|
35
|
+
```bash
|
|
36
|
+
npm exec --yes --package=codex-arsenal -- codex-arsenal list
|
|
37
|
+
```
|
|
42
38
|
|
|
43
|
-
|
|
39
|
+
## CLI
|
|
44
40
|
|
|
45
|
-
|
|
41
|
+
```bash
|
|
42
|
+
codex-arsenal init [--yes] [--force] [--dir <path>]
|
|
43
|
+
codex-arsenal list
|
|
44
|
+
codex-arsenal get <id...> [--force] [--dir <path>]
|
|
45
|
+
```
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
- `init` opens a small selector. With `--yes`, it installs default items without prompting.
|
|
48
|
+
- `list` prints all installable manifest entries grouped by category.
|
|
49
|
+
- `get` installs one or more manifest entries by id.
|
|
50
|
+
- Existing files are skipped by default. Add `--force` to overwrite them intentionally.
|
|
48
51
|
|
|
49
|
-
|
|
50
|
-
|------|------|------|
|
|
51
|
-
| context-window-compressor | 긴 대화 컨텍스트를 압축해 토큰 절약 | 준비 중 |
|
|
52
|
-
| git-diff-helper | PR diff 요약 및 리뷰 요청 자동화 | 준비 중 |
|
|
53
|
-
| multi-agent-router | 여러 에이전트에 작업을 분배하는 라우터 | 계획 중 |
|
|
54
|
-
| repo-memory | 프로젝트 구조를 기억하는 메모리 레이어 | 계획 중 |
|
|
52
|
+
The package is published on npm as [`codex-arsenal`](https://www.npmjs.com/package/codex-arsenal).
|
|
55
53
|
|
|
56
|
-
|
|
54
|
+
## What Is Included
|
|
57
55
|
|
|
58
|
-
###
|
|
56
|
+
### Behavior Guidelines
|
|
59
57
|
|
|
60
|
-
|
|
58
|
+
| ID | Installs | Purpose |
|
|
59
|
+
| --- | --- | --- |
|
|
60
|
+
| `codex-md` | `CODEX.md` | Project-local behavioral guardrails for Codex-style agents. |
|
|
61
61
|
|
|
62
|
-
|
|
63
|
-
|------|------|
|
|
64
|
-
| `debug-workflow` | 에러 로그 → 원인 분석 → 수정 → 재현 테스트까지 파이프라인화 |
|
|
65
|
-
| `pr-reviewer` | PR diff를 받아 리뷰 코멘트를 자동 생성 |
|
|
66
|
-
| `test-gen` | 함수 시그니처와 코드를 보고 유닛 테스트 자동 생성 |
|
|
67
|
-
| `refactor-pipeline` | 코드 품질 분석 → 리팩터링 제안 → 적용까지 단계 처리 |
|
|
68
|
-
| `doc-gen` | 코드베이스에서 README, API 문서 자동 작성 |
|
|
69
|
-
| `arch-analysis` | 레포 전체 구조를 분석해 의존성 맵 생성 |
|
|
62
|
+
### Configs
|
|
70
63
|
|
|
71
|
-
|
|
64
|
+
| ID | Installs | Purpose |
|
|
65
|
+
| --- | --- | --- |
|
|
66
|
+
| `config-codex` | `.codex/config.json` | Starter Codex config. |
|
|
67
|
+
| `config-vscode` | `.vscode/settings.json` | VS Code settings for agent-assisted development. |
|
|
72
68
|
|
|
73
|
-
###
|
|
69
|
+
### Prompts
|
|
74
70
|
|
|
75
|
-
|
|
71
|
+
| ID | Installs | Purpose |
|
|
72
|
+
| --- | --- | --- |
|
|
73
|
+
| `prompt-solo-dev` | `prompts/system-prompts/solo-dev.md` | Solo developer system prompt template. |
|
|
76
74
|
|
|
77
|
-
|
|
78
|
-
- `settings.json` — VSCode + Codex 통합 설정
|
|
79
|
-
- `system-prompts/` — 역할별 system prompt 템플릿 (solo dev / 팀 / 레거시 분석)
|
|
80
|
-
- `.zshrc` 스니펫 — Codex CLI alias 및 단축키 모음
|
|
81
|
-
- `tmux.conf` — AI 세션을 병렬로 띄우기 위한 tmux 레이아웃
|
|
75
|
+
### Skills
|
|
82
76
|
|
|
83
|
-
|
|
77
|
+
| ID | Installs | Purpose |
|
|
78
|
+
| --- | --- | --- |
|
|
79
|
+
| `skill-debug-workflow` | `skills/debug-workflow/` | Reproduce, diagnose, test, and fix bugs systematically. |
|
|
80
|
+
| `skill-test-gen` | `skills/test-gen/` | Generate focused tests from behavior notes and function signatures. |
|
|
81
|
+
| `skill-publishing-npm-packages` | `skills/publishing-npm-packages/SKILL.md` | Prepare, troubleshoot, and automate npm releases with Trusted Publishing. |
|
|
84
82
|
|
|
85
|
-
###
|
|
83
|
+
### Plugins
|
|
86
84
|
|
|
87
|
-
|
|
85
|
+
| ID | Installs | Purpose |
|
|
86
|
+
| --- | --- | --- |
|
|
87
|
+
| `plugin-context-window-compressor` | `plugins/context-window-compressor/` | Plugin sketch for compressing long agent context into concise handoff notes. |
|
|
88
88
|
|
|
89
|
-
|
|
90
|
-
|----------|------|---------------|
|
|
91
|
-
| `solo-dev-loop` | 혼자 개발하는 개발자 | 계획 → 코딩 → 테스트 → 커밋을 에이전트와 함께 |
|
|
92
|
-
| `startup-mvp` | 빠른 프로토타입이 필요한 팀 | 스펙 → 구현 → 배포 최단 경로 |
|
|
93
|
-
| `legacy-onboarding` | 오래된 코드베이스 합류 | 에이전트로 구조 파악 → 코드 맵 생성 |
|
|
94
|
-
| `ai-pair-programming` | 주니어/미드 개발자 | 에이전트를 시니어처럼 활용하는 패턴 |
|
|
95
|
-
| `multi-agent-orch` | 복잡한 대형 태스크 | 여러 에이전트에게 역할 분배 후 결과 통합 |
|
|
89
|
+
### Workflows
|
|
96
90
|
|
|
97
|
-
|
|
91
|
+
| ID | Installs | Purpose |
|
|
92
|
+
| --- | --- | --- |
|
|
93
|
+
| `workflow-solo-dev-loop` | `workflows/solo-dev-loop/` | A plan, code, test, commit loop for solo developers using agents. |
|
|
98
94
|
|
|
99
|
-
|
|
95
|
+
## Repository Layout
|
|
100
96
|
|
|
101
|
-
|
|
97
|
+
```text
|
|
98
|
+
codex-arsenal/
|
|
99
|
+
bin/ CLI entrypoint
|
|
100
|
+
lib/ manifest, installer, and fetcher
|
|
101
|
+
configs/ reusable editor and agent configs
|
|
102
|
+
plugins/ plugin sketches
|
|
103
|
+
prompts/ system prompt templates
|
|
104
|
+
skills/ reusable agent skills
|
|
105
|
+
workflows/ repeatable agentic workflows
|
|
106
|
+
references/ curated references and notes
|
|
107
|
+
examples/ before/after examples
|
|
108
|
+
test/ Node test suite
|
|
109
|
+
```
|
|
102
110
|
|
|
103
|
-
-
|
|
104
|
-
- 주목할 GitHub 레포 (with star 기준 및 실용성 코멘트)
|
|
105
|
-
- 블로그 · 튜토리얼 (검증된 것만)
|
|
106
|
-
- 프롬프트 엔지니어링 컬렉션
|
|
111
|
+
`lib/manifest.js` is the source of truth for installable items. Add new content there when you want it to appear in `codex-arsenal list` or be installable through `codex-arsenal get`.
|
|
107
112
|
|
|
108
|
-
|
|
113
|
+
## Development
|
|
109
114
|
|
|
110
|
-
|
|
115
|
+
Run tests:
|
|
111
116
|
|
|
112
|
-
|
|
117
|
+
```bash
|
|
118
|
+
npm test
|
|
119
|
+
```
|
|
113
120
|
|
|
114
|
-
|
|
115
|
-
|------|------|
|
|
116
|
-
| ✅ 실사용 검증 | 실제로 사용해봤거나, 커뮤니티에서 반복 검증된 것 |
|
|
117
|
-
| ✅ 실무 적용 가능 | 장난감 예제가 아닌 실제 코드베이스에 적용 가능 |
|
|
118
|
-
| ✅ 반복 사용성 | 한 번만 쓰고 마는 것이 아닌, 루틴으로 쓸 수 있는 것 |
|
|
119
|
-
| ✅ setup 대비 효율 | 설치/설정 비용보다 얻는 생산성이 명확히 큰 것 |
|
|
120
|
-
| ✅ 한계 보완 | Codex/Claude Code의 알려진 약점을 보완하는 것 |
|
|
121
|
+
Preview the npm package contents:
|
|
121
122
|
|
|
122
|
-
|
|
123
|
+
```bash
|
|
124
|
+
npm pack --dry-run
|
|
125
|
+
```
|
|
123
126
|
|
|
124
|
-
|
|
127
|
+
Try the local CLI:
|
|
125
128
|
|
|
126
129
|
```bash
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
+
node bin/cli.js list
|
|
131
|
+
node bin/cli.js get codex-md --dir ./tmp-install
|
|
132
|
+
```
|
|
130
133
|
|
|
131
|
-
|
|
132
|
-
cp configs/vscode/settings.json ~/.vscode/settings.json
|
|
134
|
+
## Publishing
|
|
133
135
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
+
This repository is configured for npm Trusted Publishing through GitHub Actions.
|
|
137
|
+
|
|
138
|
+
Release flow:
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
npm test
|
|
142
|
+
npm pack --dry-run
|
|
143
|
+
npm version patch
|
|
144
|
+
git push --follow-tags
|
|
136
145
|
```
|
|
137
146
|
|
|
138
|
-
|
|
147
|
+
Use `minor` instead of `patch` when adding new installable content or CLI behavior:
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
npm version minor
|
|
151
|
+
git push --follow-tags
|
|
152
|
+
```
|
|
139
153
|
|
|
140
|
-
|
|
154
|
+
The publish workflow runs on `v*` tags and publishes with OIDC, so it does not require a long-lived `NPM_TOKEN`.
|
|
141
155
|
|
|
142
|
-
##
|
|
156
|
+
## Codex Plugin Distribution
|
|
143
157
|
|
|
144
|
-
|
|
158
|
+
The npm package is the current public distribution channel. Codex plugin library publishing is separate from npm and currently does not expose a general public submission flow in the public docs.
|
|
145
159
|
|
|
146
|
-
|
|
147
|
-
- before / after 생산성 차이가 명확한 것
|
|
148
|
-
- setup 과정이 step-by-step으로 정리된 것
|
|
149
|
-
- 특정 상황(레거시, 대형 레포, 팀 협업 등)에서 효과적인 것
|
|
160
|
+
For now, use one of these paths:
|
|
150
161
|
|
|
151
|
-
|
|
162
|
+
- publish reusable files through `codex-arsenal` on npm;
|
|
163
|
+
- keep plugin sketches under `plugins/`;
|
|
164
|
+
- create a local or team marketplace file at `.agents/plugins/marketplace.json` when you want Codex app users to install a repo plugin from a local marketplace;
|
|
165
|
+
- track OpenAI's Codex plugin documentation for an official public marketplace submission path.
|
|
152
166
|
|
|
153
|
-
|
|
154
|
-
2. 해당 카테고리 폴더에 파일 추가 (각 폴더의 `TEMPLATE.md` 참고)
|
|
155
|
-
3. PR 제목에 카테고리 명시: `[plugin] context-window-compressor 추가`
|
|
156
|
-
4. PR 본문에 **사용 배경 / 실제 효과 / 주의사항** 포함
|
|
167
|
+
See `docs/codex-plugin-distribution.md` for the current assessment.
|
|
157
168
|
|
|
158
|
-
|
|
169
|
+
## Contribution Guidelines
|
|
159
170
|
|
|
160
|
-
|
|
171
|
+
Good additions should be:
|
|
161
172
|
|
|
162
|
-
|
|
163
|
-
|
|
173
|
+
- useful in real projects, not just demos;
|
|
174
|
+
- small enough to understand quickly;
|
|
175
|
+
- documented with setup and usage notes;
|
|
176
|
+
- installable through the manifest when appropriate;
|
|
177
|
+
- verified with tests or a concrete manual check.
|
|
164
178
|
|
|
165
|
-
|
|
166
|
-
실제로 쓸 수 있는 도구와 패턴을 기록하는 공간입니다.
|
|
179
|
+
When adding a new installable item:
|
|
167
180
|
|
|
168
|
-
|
|
181
|
+
1. Add the files under the appropriate top-level directory.
|
|
182
|
+
2. Add a manifest entry in `lib/manifest.js`.
|
|
183
|
+
3. Run `npm test`.
|
|
184
|
+
4. Run `node bin/cli.js list` and confirm the item appears.
|
|
185
|
+
5. Run `npm pack --dry-run` and confirm the intended files are included.
|
|
169
186
|
|
|
170
|
-
##
|
|
187
|
+
## License
|
|
171
188
|
|
|
172
|
-
|
|
173
|
-
`llm-workflow` `productivity` `automation` `vscode` `terminal`
|
|
189
|
+
MIT
|
package/bin/cli.js
CHANGED
|
@@ -6,9 +6,11 @@ function printHelp() {
|
|
|
6
6
|
console.log(`codex-arsenal
|
|
7
7
|
|
|
8
8
|
Usage:
|
|
9
|
-
codex-arsenal init [--yes] [--dir <path>]
|
|
9
|
+
codex-arsenal init [--yes] [--force] [--dir <path>]
|
|
10
10
|
codex-arsenal list
|
|
11
|
-
codex-arsenal get <id...> [--dir <path>]
|
|
11
|
+
codex-arsenal get <id...> [--force] [--dir <path>]
|
|
12
|
+
|
|
13
|
+
By default, existing files are skipped. Use --force to overwrite them.
|
|
12
14
|
`);
|
|
13
15
|
}
|
|
14
16
|
|
|
@@ -28,7 +30,7 @@ function nonOptionArgs(args) {
|
|
|
28
30
|
index += 1;
|
|
29
31
|
continue;
|
|
30
32
|
}
|
|
31
|
-
if (arg === "--yes" || arg === "-y") {
|
|
33
|
+
if (arg === "--yes" || arg === "-y" || arg === "--force") {
|
|
32
34
|
continue;
|
|
33
35
|
}
|
|
34
36
|
result.push(arg);
|
|
@@ -51,6 +53,7 @@ function printList() {
|
|
|
51
53
|
async function main(argv) {
|
|
52
54
|
const [command = "init", ...args] = argv;
|
|
53
55
|
const dir = readOption(args, "--dir", readOption(args, "-d", process.cwd()));
|
|
56
|
+
const force = args.includes("--force");
|
|
54
57
|
|
|
55
58
|
if (command === "help" || command === "--help" || command === "-h") {
|
|
56
59
|
printHelp();
|
|
@@ -67,12 +70,12 @@ async function main(argv) {
|
|
|
67
70
|
if (!ids.length) {
|
|
68
71
|
throw new Error("get requires at least one item id");
|
|
69
72
|
}
|
|
70
|
-
await runInit({ preSelected: findManifestItems(ids), skipPrompt: true, dir });
|
|
73
|
+
await runInit({ preSelected: findManifestItems(ids), skipPrompt: true, dir, force });
|
|
71
74
|
return;
|
|
72
75
|
}
|
|
73
76
|
|
|
74
77
|
if (command === "init") {
|
|
75
|
-
await runInit({ yes: args.includes("--yes") || args.includes("-y"), dir });
|
|
78
|
+
await runInit({ yes: args.includes("--yes") || args.includes("-y"), dir, force });
|
|
76
79
|
return;
|
|
77
80
|
}
|
|
78
81
|
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Codex Plugin Distribution
|
|
2
|
+
|
|
3
|
+
## Current Assessment
|
|
4
|
+
|
|
5
|
+
As of May 23, 2026, the practical public distribution path for Codex-Arsenal is npm. OpenAI's public Codex material says Codex users can browse the plugins library and create plugins in the Codex app, but it does not document a general public submission process for third-party plugins.
|
|
6
|
+
|
|
7
|
+
Relevant OpenAI pages:
|
|
8
|
+
|
|
9
|
+
- [Plugins and skills](https://openai.com/academy/codex-plugins-and-skills/)
|
|
10
|
+
- [Codex](https://openai.com/codex/)
|
|
11
|
+
- [Using Codex with your ChatGPT plan](https://help.openai.com/en/articles/11369540/)
|
|
12
|
+
|
|
13
|
+
## Recommended Path
|
|
14
|
+
|
|
15
|
+
1. Keep publishing installable skills, prompts, configs, and workflow files through `codex-arsenal` on npm.
|
|
16
|
+
2. Keep plugin ideas in `plugins/<name>/` until they become real Codex plugins.
|
|
17
|
+
3. When a plugin is ready for Codex app testing, convert it to a Codex plugin structure with `.codex-plugin/plugin.json`.
|
|
18
|
+
4. Add a repo-local marketplace entry in `.agents/plugins/marketplace.json` for team/local installation.
|
|
19
|
+
5. If OpenAI opens a formal public marketplace submission path, package the plugin manifest, documentation, permission model, and test notes for review.
|
|
20
|
+
|
|
21
|
+
## Repo Marketplace Shape
|
|
22
|
+
|
|
23
|
+
Use this shape for local or team discovery:
|
|
24
|
+
|
|
25
|
+
```json
|
|
26
|
+
{
|
|
27
|
+
"name": "codex-arsenal",
|
|
28
|
+
"interface": {
|
|
29
|
+
"displayName": "Codex-Arsenal"
|
|
30
|
+
},
|
|
31
|
+
"plugins": [
|
|
32
|
+
{
|
|
33
|
+
"name": "context-window-compressor",
|
|
34
|
+
"source": {
|
|
35
|
+
"source": "local",
|
|
36
|
+
"path": "./plugins/context-window-compressor"
|
|
37
|
+
},
|
|
38
|
+
"policy": {
|
|
39
|
+
"installation": "AVAILABLE",
|
|
40
|
+
"authentication": "ON_INSTALL"
|
|
41
|
+
},
|
|
42
|
+
"category": "Productivity"
|
|
43
|
+
}
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Before Submitting Anywhere
|
|
49
|
+
|
|
50
|
+
- Define exactly what external systems the plugin touches.
|
|
51
|
+
- Keep permissions narrow and explain authentication.
|
|
52
|
+
- Provide a small demo workflow and screenshots if the plugin has UI.
|
|
53
|
+
- Include test notes for install, auth, failure states, and uninstall.
|
|
54
|
+
- Avoid bundling broad arsenals into one plugin. Publish focused plugins that solve one job well.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# npm Publishing
|
|
2
|
+
|
|
3
|
+
This package is set up for npm Trusted Publishing from GitHub Actions.
|
|
4
|
+
|
|
5
|
+
## One-time npm setup
|
|
6
|
+
|
|
7
|
+
1. Create or claim the `codex-arsenal` package on npm.
|
|
8
|
+
2. On npmjs.com, open the package settings and add a Trusted Publisher:
|
|
9
|
+
- Provider: GitHub Actions
|
|
10
|
+
- Owner: `citron03`
|
|
11
|
+
- Repository: `Codex-Arsenal`
|
|
12
|
+
- Workflow filename: `publish.yml`
|
|
13
|
+
- Environment: `npm`
|
|
14
|
+
3. After the first trusted publish works, set publishing access to require 2FA and disallow tokens.
|
|
15
|
+
|
|
16
|
+
## Release process
|
|
17
|
+
|
|
18
|
+
1. Ensure `main` is green.
|
|
19
|
+
2. Update the version:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npm version patch
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
3. Push the commit and tag:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
git push --follow-tags
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
GitHub Actions will run tests, perform a package dry run, and publish to npm from the `v*` tag.
|
|
32
|
+
|
|
33
|
+
## Why Trusted Publishing
|
|
34
|
+
|
|
35
|
+
Trusted Publishing uses short-lived OIDC credentials from GitHub Actions instead of a long-lived `NPM_TOKEN`. For public packages published from public repositories, npm also creates provenance attestations automatically.
|
package/lib/installer.js
CHANGED
|
@@ -2,12 +2,15 @@ import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
|
2
2
|
import { createInterface } from "node:readline/promises";
|
|
3
3
|
import { stdin as input, stdout as output } from "node:process";
|
|
4
4
|
import path from "node:path";
|
|
5
|
+
import { fileURLToPath } from "node:url";
|
|
5
6
|
import { BASE_URL, MANIFEST } from "./manifest.js";
|
|
6
7
|
import { fetchFile } from "./fetcher.js";
|
|
7
8
|
|
|
9
|
+
const PACKAGE_ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
|
|
10
|
+
|
|
8
11
|
async function readSourceFile(src) {
|
|
9
12
|
try {
|
|
10
|
-
return await readFile(src, "utf8");
|
|
13
|
+
return await readFile(path.join(PACKAGE_ROOT, src), "utf8");
|
|
11
14
|
} catch (error) {
|
|
12
15
|
if (error.code !== "ENOENT") {
|
|
13
16
|
throw error;
|
|
@@ -16,28 +19,45 @@ async function readSourceFile(src) {
|
|
|
16
19
|
}
|
|
17
20
|
}
|
|
18
21
|
|
|
19
|
-
export async function installItems(items, targetDir) {
|
|
22
|
+
export async function installItems(items, targetDir, opts = {}) {
|
|
20
23
|
const resolvedTarget = path.resolve(targetDir);
|
|
21
24
|
let installed = 0;
|
|
22
25
|
let failed = 0;
|
|
26
|
+
const successes = [];
|
|
27
|
+
const skipped = [];
|
|
23
28
|
const failures = [];
|
|
29
|
+
const readSource = opts.readSourceFile || readSourceFile;
|
|
30
|
+
const force = !!opts.force;
|
|
24
31
|
|
|
25
32
|
for (const item of items) {
|
|
26
33
|
for (const file of item.files) {
|
|
27
34
|
const destination = path.join(resolvedTarget, file.dest);
|
|
28
35
|
try {
|
|
29
|
-
|
|
36
|
+
if (!force) {
|
|
37
|
+
try {
|
|
38
|
+
await readFile(destination, "utf8");
|
|
39
|
+
skipped.push(file.dest);
|
|
40
|
+
continue;
|
|
41
|
+
} catch (error) {
|
|
42
|
+
if (error.code !== "ENOENT") {
|
|
43
|
+
throw error;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const content = await readSource(file.src);
|
|
30
49
|
await mkdir(path.dirname(destination), { recursive: true });
|
|
31
50
|
await writeFile(destination, content, "utf8");
|
|
32
51
|
installed += 1;
|
|
52
|
+
successes.push(file.dest);
|
|
33
53
|
} catch (error) {
|
|
34
54
|
failed += 1;
|
|
35
|
-
failures.push({ item: item.id, file: file.src, error: error.message });
|
|
55
|
+
failures.push({ item: item.id, file: file.src, dest: file.dest, error: error.message });
|
|
36
56
|
}
|
|
37
57
|
}
|
|
38
58
|
}
|
|
39
59
|
|
|
40
|
-
return { installed, failed, failures, targetDir: resolvedTarget };
|
|
60
|
+
return { installed, failed, successes, skipped, failures, targetDir: resolvedTarget };
|
|
41
61
|
}
|
|
42
62
|
|
|
43
63
|
function defaultItems() {
|
|
@@ -75,15 +95,24 @@ export async function runInit(opts = {}) {
|
|
|
75
95
|
|
|
76
96
|
if (!selected.length) {
|
|
77
97
|
console.log("No items selected.");
|
|
78
|
-
return { installed: 0, failed: 0, failures: [], targetDir: path.resolve(opts.dir || ".") };
|
|
98
|
+
return { installed: 0, failed: 0, successes: [], skipped: [], failures: [], targetDir: path.resolve(opts.dir || ".") };
|
|
79
99
|
}
|
|
80
100
|
|
|
81
|
-
const result = await installItems(selected, opts.dir || process.cwd()
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
101
|
+
const result = await installItems(selected, opts.dir || process.cwd(), {
|
|
102
|
+
readSourceFile: opts.readSourceFile,
|
|
103
|
+
force: opts.force
|
|
104
|
+
});
|
|
105
|
+
for (const file of result.successes) {
|
|
106
|
+
console.log(`installed ${file}`);
|
|
107
|
+
}
|
|
108
|
+
for (const file of result.skipped) {
|
|
109
|
+
console.log(`skipped ${file} (already exists; use --force to overwrite)`);
|
|
110
|
+
}
|
|
111
|
+
for (const failure of result.failures) {
|
|
112
|
+
console.log(`failed ${failure.dest} (${failure.error})`);
|
|
86
113
|
}
|
|
87
|
-
console.log(
|
|
114
|
+
console.log(
|
|
115
|
+
`\nDone: ${result.installed} installed${result.skipped.length ? `, ${result.skipped.length} skipped` : ""}${result.failed ? `, ${result.failed} failed` : ""}.`
|
|
116
|
+
);
|
|
88
117
|
return result;
|
|
89
118
|
}
|
package/lib/manifest.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export const REPO = "
|
|
1
|
+
export const REPO = "citron03/Codex-Arsenal";
|
|
2
2
|
export const BRANCH = "main";
|
|
3
3
|
export const BASE_URL = `https://raw.githubusercontent.com/${REPO}/${BRANCH}`;
|
|
4
4
|
|
|
@@ -11,13 +11,6 @@ export const MANIFEST = [
|
|
|
11
11
|
files: [{ src: "CODEX.md", dest: "CODEX.md" }],
|
|
12
12
|
default: true
|
|
13
13
|
},
|
|
14
|
-
{
|
|
15
|
-
id: "claude-md",
|
|
16
|
-
category: "Behavior Guidelines",
|
|
17
|
-
label: "CLAUDE.md",
|
|
18
|
-
description: "Behavior guidelines adapted for Claude Code agents.",
|
|
19
|
-
files: [{ src: "CLAUDE.md", dest: "CLAUDE.md" }]
|
|
20
|
-
},
|
|
21
14
|
{
|
|
22
15
|
id: "config-codex",
|
|
23
16
|
category: "Configs",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codex-arsenal",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "A practical arsenal of Codex
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"description": "A practical arsenal of Codex plugins, skills, prompts, workflows, and configs.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"codex-arsenal": "bin/cli.js"
|
|
@@ -22,9 +22,10 @@
|
|
|
22
22
|
},
|
|
23
23
|
"files": [
|
|
24
24
|
"bin/",
|
|
25
|
+
"docs/codex-plugin-distribution.md",
|
|
26
|
+
"docs/npm-publishing.md",
|
|
25
27
|
"lib/",
|
|
26
28
|
"CODEX.md",
|
|
27
|
-
"CLAUDE.md",
|
|
28
29
|
"configs/",
|
|
29
30
|
"plugins/",
|
|
30
31
|
"prompts/",
|
|
@@ -36,7 +37,6 @@
|
|
|
36
37
|
},
|
|
37
38
|
"keywords": [
|
|
38
39
|
"codex",
|
|
39
|
-
"claude-code",
|
|
40
40
|
"ai-agent",
|
|
41
41
|
"developer-tools",
|
|
42
42
|
"prompt-engineering"
|
package/CLAUDE.md
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
# CLAUDE.md
|
|
2
|
-
|
|
3
|
-
Use this file as a project-local behavior guide for Claude Code agents.
|
|
4
|
-
|
|
5
|
-
## Operating Principles
|
|
6
|
-
|
|
7
|
-
- Read the repository instructions before editing.
|
|
8
|
-
- Keep changes small and directly tied to the task.
|
|
9
|
-
- Prefer tests before behavior changes.
|
|
10
|
-
- Explain uncertainty instead of guessing silently.
|
|
11
|
-
- Do not overwrite user work unless explicitly asked.
|
|
12
|
-
|
|
13
|
-
## Completion Criteria
|
|
14
|
-
|
|
15
|
-
Before reporting completion, run the smallest command that proves the change works and summarize the result.
|