codex-arsenal 0.2.1 → 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 +18 -5
- 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 +28 -5
- package/lib/manifest.js +0 -7
- 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,8 +1,8 @@
|
|
|
1
1
|
# Codex-Arsenal
|
|
2
2
|
|
|
3
|
-
Practical building blocks for working with OpenAI Codex
|
|
3
|
+
Practical building blocks for working with OpenAI Codex.
|
|
4
4
|
|
|
5
|
-
Codex-Arsenal is not an awesome list. It is a small, installable collection of
|
|
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.
|
|
6
6
|
|
|
7
7
|
## Install
|
|
8
8
|
|
|
@@ -39,14 +39,15 @@ npm exec --yes --package=codex-arsenal -- codex-arsenal list
|
|
|
39
39
|
## CLI
|
|
40
40
|
|
|
41
41
|
```bash
|
|
42
|
-
codex-arsenal init [--yes] [--dir <path>]
|
|
42
|
+
codex-arsenal init [--yes] [--force] [--dir <path>]
|
|
43
43
|
codex-arsenal list
|
|
44
|
-
codex-arsenal get <id...> [--dir <path>]
|
|
44
|
+
codex-arsenal get <id...> [--force] [--dir <path>]
|
|
45
45
|
```
|
|
46
46
|
|
|
47
47
|
- `init` opens a small selector. With `--yes`, it installs default items without prompting.
|
|
48
48
|
- `list` prints all installable manifest entries grouped by category.
|
|
49
49
|
- `get` installs one or more manifest entries by id.
|
|
50
|
+
- Existing files are skipped by default. Add `--force` to overwrite them intentionally.
|
|
50
51
|
|
|
51
52
|
The package is published on npm as [`codex-arsenal`](https://www.npmjs.com/package/codex-arsenal).
|
|
52
53
|
|
|
@@ -57,7 +58,6 @@ The package is published on npm as [`codex-arsenal`](https://www.npmjs.com/packa
|
|
|
57
58
|
| ID | Installs | Purpose |
|
|
58
59
|
| --- | --- | --- |
|
|
59
60
|
| `codex-md` | `CODEX.md` | Project-local behavioral guardrails for Codex-style agents. |
|
|
60
|
-
| `claude-md` | `CLAUDE.md` | Project-local behavioral guardrails for Claude Code. |
|
|
61
61
|
|
|
62
62
|
### Configs
|
|
63
63
|
|
|
@@ -153,6 +153,19 @@ git push --follow-tags
|
|
|
153
153
|
|
|
154
154
|
The publish workflow runs on `v*` tags and publishes with OIDC, so it does not require a long-lived `NPM_TOKEN`.
|
|
155
155
|
|
|
156
|
+
## Codex Plugin Distribution
|
|
157
|
+
|
|
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.
|
|
159
|
+
|
|
160
|
+
For now, use one of these paths:
|
|
161
|
+
|
|
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.
|
|
166
|
+
|
|
167
|
+
See `docs/codex-plugin-distribution.md` for the current assessment.
|
|
168
|
+
|
|
156
169
|
## Contribution Guidelines
|
|
157
170
|
|
|
158
171
|
Good additions should be:
|
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;
|
|
@@ -21,13 +24,27 @@ export async function installItems(items, targetDir, opts = {}) {
|
|
|
21
24
|
let installed = 0;
|
|
22
25
|
let failed = 0;
|
|
23
26
|
const successes = [];
|
|
27
|
+
const skipped = [];
|
|
24
28
|
const failures = [];
|
|
25
29
|
const readSource = opts.readSourceFile || readSourceFile;
|
|
30
|
+
const force = !!opts.force;
|
|
26
31
|
|
|
27
32
|
for (const item of items) {
|
|
28
33
|
for (const file of item.files) {
|
|
29
34
|
const destination = path.join(resolvedTarget, file.dest);
|
|
30
35
|
try {
|
|
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
|
+
|
|
31
48
|
const content = await readSource(file.src);
|
|
32
49
|
await mkdir(path.dirname(destination), { recursive: true });
|
|
33
50
|
await writeFile(destination, content, "utf8");
|
|
@@ -40,7 +57,7 @@ export async function installItems(items, targetDir, opts = {}) {
|
|
|
40
57
|
}
|
|
41
58
|
}
|
|
42
59
|
|
|
43
|
-
return { installed, failed, successes, failures, targetDir: resolvedTarget };
|
|
60
|
+
return { installed, failed, successes, skipped, failures, targetDir: resolvedTarget };
|
|
44
61
|
}
|
|
45
62
|
|
|
46
63
|
function defaultItems() {
|
|
@@ -78,18 +95,24 @@ export async function runInit(opts = {}) {
|
|
|
78
95
|
|
|
79
96
|
if (!selected.length) {
|
|
80
97
|
console.log("No items selected.");
|
|
81
|
-
return { installed: 0, failed: 0, successes: [], failures: [], targetDir: path.resolve(opts.dir || ".") };
|
|
98
|
+
return { installed: 0, failed: 0, successes: [], skipped: [], failures: [], targetDir: path.resolve(opts.dir || ".") };
|
|
82
99
|
}
|
|
83
100
|
|
|
84
101
|
const result = await installItems(selected, opts.dir || process.cwd(), {
|
|
85
|
-
readSourceFile: opts.readSourceFile
|
|
102
|
+
readSourceFile: opts.readSourceFile,
|
|
103
|
+
force: opts.force
|
|
86
104
|
});
|
|
87
105
|
for (const file of result.successes) {
|
|
88
106
|
console.log(`installed ${file}`);
|
|
89
107
|
}
|
|
108
|
+
for (const file of result.skipped) {
|
|
109
|
+
console.log(`skipped ${file} (already exists; use --force to overwrite)`);
|
|
110
|
+
}
|
|
90
111
|
for (const failure of result.failures) {
|
|
91
112
|
console.log(`failed ${failure.dest} (${failure.error})`);
|
|
92
113
|
}
|
|
93
|
-
console.log(
|
|
114
|
+
console.log(
|
|
115
|
+
`\nDone: ${result.installed} installed${result.skipped.length ? `, ${result.skipped.length} skipped` : ""}${result.failed ? `, ${result.failed} failed` : ""}.`
|
|
116
|
+
);
|
|
94
117
|
return result;
|
|
95
118
|
}
|
package/lib/manifest.js
CHANGED
|
@@ -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.
|