@dynokostya/just-works 1.0.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/.claude/agents/csharp-code-writer.md +32 -0
- package/.claude/agents/diagrammer.md +49 -0
- package/.claude/agents/frontend-code-writer.md +36 -0
- package/.claude/agents/prompt-writer.md +38 -0
- package/.claude/agents/python-code-writer.md +32 -0
- package/.claude/agents/swift-code-writer.md +32 -0
- package/.claude/agents/typescript-code-writer.md +32 -0
- package/.claude/commands/git-sync.md +96 -0
- package/.claude/commands/project-docs.md +287 -0
- package/.claude/settings.json +112 -0
- package/.claude/settings.json.default +15 -0
- package/.claude/skills/csharp-coding/SKILL.md +368 -0
- package/.claude/skills/ddd-architecture-python/SKILL.md +288 -0
- package/.claude/skills/feature-driven-architecture-python/SKILL.md +302 -0
- package/.claude/skills/gemini-3-prompting/SKILL.md +483 -0
- package/.claude/skills/gpt-5-2-prompting/SKILL.md +295 -0
- package/.claude/skills/opus-4-6-prompting/SKILL.md +315 -0
- package/.claude/skills/plantuml-diagramming/SKILL.md +758 -0
- package/.claude/skills/python-coding/SKILL.md +293 -0
- package/.claude/skills/react-coding/SKILL.md +264 -0
- package/.claude/skills/rest-api/SKILL.md +421 -0
- package/.claude/skills/shadcn-ui-coding/SKILL.md +454 -0
- package/.claude/skills/swift-coding/SKILL.md +401 -0
- package/.claude/skills/tailwind-css-coding/SKILL.md +268 -0
- package/.claude/skills/typescript-coding/SKILL.md +464 -0
- package/.claude/statusline-command.sh +34 -0
- package/.codex/prompts/plan-reviewer.md +162 -0
- package/.codex/prompts/project-docs.md +287 -0
- package/.codex/skills/ddd-architecture-python/SKILL.md +288 -0
- package/.codex/skills/feature-driven-architecture-python/SKILL.md +302 -0
- package/.codex/skills/gemini-3-prompting/SKILL.md +483 -0
- package/.codex/skills/gpt-5-2-prompting/SKILL.md +295 -0
- package/.codex/skills/opus-4-6-prompting/SKILL.md +315 -0
- package/.codex/skills/plantuml-diagramming/SKILL.md +758 -0
- package/.codex/skills/python-coding/SKILL.md +293 -0
- package/.codex/skills/react-coding/SKILL.md +264 -0
- package/.codex/skills/rest-api/SKILL.md +421 -0
- package/.codex/skills/shadcn-ui-coding/SKILL.md +454 -0
- package/.codex/skills/tailwind-css-coding/SKILL.md +268 -0
- package/.codex/skills/typescript-coding/SKILL.md +464 -0
- package/AGENTS.md +57 -0
- package/CLAUDE.md +98 -0
- package/LICENSE +201 -0
- package/README.md +114 -0
- package/bin/cli.mjs +291 -0
- package/package.json +39 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# just-works
|
|
2
|
+
|
|
3
|
+
Drop-in AI agent workflows, coding skills, and prompt standards for **Claude Code** and **OpenAI Codex**.
|
|
4
|
+
|
|
5
|
+
Just copy `.claude/` into any project — or install globally — and get pre-configured agents, quality guardrails, and documentation pipelines out of the box.
|
|
6
|
+
|
|
7
|
+
**`.codex/` works only if you install it globally (only skills folder works per-project).**
|
|
8
|
+
|
|
9
|
+
## What's Inside
|
|
10
|
+
|
|
11
|
+
**Agents** — `python-code-writer`, `prompt-writer` (Claude).
|
|
12
|
+
**Commands** - `plan-reviewer` (Codex), `project-docs` (Claude & Codex).
|
|
13
|
+
|
|
14
|
+
**Skills** — coding standards (Python, React, Tailwind, shadcn/ui), architecture patterns (DDD, feature-driven), and model-specific prompt engineering (Claude Opus 4.6, GPT-5.2, Gemini 3). Applied automatically based on the file type you're editing.
|
|
15
|
+
|
|
16
|
+
**Security** — `settings.json` blocks agent access to `.env`, `*.pem`, `*.key`, credentials, cloud configs, SSH keys, Terraform state, and databases.
|
|
17
|
+
|
|
18
|
+
## Installation
|
|
19
|
+
|
|
20
|
+
### Quick install (recommended)
|
|
21
|
+
|
|
22
|
+
Requires [Node.js](https://nodejs.org/) 18+.
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npx @dynokostya/just-works # default settings
|
|
26
|
+
npx @dynokostya/just-works --personal # opinionated settings (permissions, hooks, sounds)
|
|
27
|
+
npx @dynokostya/just-works --dry-run # preview without changes
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### From source
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
git clone https://github.com/dynokostya/just-works.git
|
|
34
|
+
cd just-works
|
|
35
|
+
./install.sh # macOS / Linux
|
|
36
|
+
install.bat # Windows
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Installs agents, skills, commands, and settings globally to `~/.claude/` and `~/.codex/`. Existing files get backed up automatically.
|
|
40
|
+
|
|
41
|
+
To update:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
npx @dynokostya/just-works@latest
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Or from source: `git pull && ./install.sh`
|
|
48
|
+
|
|
49
|
+
### Options
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
--personal # opinionated settings (pre-approved commands, hooks, sounds)
|
|
53
|
+
--dry-run # preview without changes
|
|
54
|
+
--skip-config # skip settings.json
|
|
55
|
+
--skip-statusline # skip statusline-command.sh
|
|
56
|
+
--skip-skills-claude # skip Claude Code skills
|
|
57
|
+
--skip-skills-codex # skip Codex skills
|
|
58
|
+
--claude-only # skip Codex
|
|
59
|
+
--codex-only # skip Claude
|
|
60
|
+
--no-backup # skip backup prompt (for CI/scripts)
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Codex Azure config
|
|
64
|
+
|
|
65
|
+
Default install copies `config.toml.default` → `~/.codex/config.toml` (minimal model config).
|
|
66
|
+
Personal (my) install copies `config.toml` → `~/.codex/config.toml` (includes MCP servers).
|
|
67
|
+
|
|
68
|
+
Either way, edit the file — replace `<your-resource-name>` with your Azure OpenAI resource and set your environment variable:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
export AZURE_OPENAI_API_KEY="your-key-here"
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### MCP for Claude Code
|
|
75
|
+
|
|
76
|
+
MCP servers are configured per-project, not globally. To set up MCP in your project:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
cp .mcp.json.default /path/to/your/project/.mcp.json
|
|
80
|
+
```
|
|
81
|
+
OR
|
|
82
|
+
```bash
|
|
83
|
+
cp .mcp.json /path/to/your/project/.mcp.json
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Requires `npx` (Node.js) in your PATH.
|
|
87
|
+
|
|
88
|
+
## Project Structure
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
.claude/
|
|
92
|
+
agents/ # Claude Code agent definitions
|
|
93
|
+
skills/ # Coding and prompting standards
|
|
94
|
+
commands/ # Multi-step workflows (project-docs)
|
|
95
|
+
settings.json # Permissions, hooks, MCP servers
|
|
96
|
+
.codex/
|
|
97
|
+
prompts/ # Codex agent definitions
|
|
98
|
+
skills/ # Same standards, mirrored for Codex
|
|
99
|
+
config/azure/ # config.toml.default + config.toml
|
|
100
|
+
CLAUDE.md # Behavioral instructions for Claude Code
|
|
101
|
+
AGENTS.md # Behavioral instructions for Codex
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
`.claude/` and `.codex/` are parallel and independent — use one or both.
|
|
105
|
+
|
|
106
|
+
## Customization
|
|
107
|
+
|
|
108
|
+
Add project-specific agents in `.claude/agents/` or `.codex/prompts/`. Override skill defaults in your own `CLAUDE.md` or `AGENTS.md`. Extend the deny-list in `.claude/settings.json`.
|
|
109
|
+
|
|
110
|
+
If you fork this: skills must be mirrored across both providers (Codex doesn't support `@file` references). Keep instructions model-agnostic.
|
|
111
|
+
|
|
112
|
+
## License
|
|
113
|
+
|
|
114
|
+
Apache 2.0
|
package/bin/cli.mjs
ADDED
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { readFileSync, existsSync, mkdirSync, cpSync, copyFileSync, rmSync, statSync } from 'node:fs';
|
|
4
|
+
import { join, dirname, relative } from 'node:path';
|
|
5
|
+
import { homedir } from 'node:os';
|
|
6
|
+
import { createInterface } from 'node:readline';
|
|
7
|
+
import { fileURLToPath } from 'node:url';
|
|
8
|
+
|
|
9
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
10
|
+
const __dirname = dirname(__filename);
|
|
11
|
+
const PACKAGE_ROOT = join(__dirname, '..');
|
|
12
|
+
|
|
13
|
+
// ---------------------------------------------------------------------------
|
|
14
|
+
// Colors
|
|
15
|
+
// ---------------------------------------------------------------------------
|
|
16
|
+
const isTTY = process.stdout.isTTY;
|
|
17
|
+
const GREEN = isTTY ? '\x1b[0;32m' : '';
|
|
18
|
+
const YELLOW = isTTY ? '\x1b[0;33m' : '';
|
|
19
|
+
const RED = isTTY ? '\x1b[0;31m' : '';
|
|
20
|
+
const BOLD = isTTY ? '\x1b[1m' : '';
|
|
21
|
+
const NC = isTTY ? '\x1b[0m' : '';
|
|
22
|
+
|
|
23
|
+
const info = (msg) => console.log(`${GREEN}[+]${NC} ${msg}`);
|
|
24
|
+
const warn = (msg) => console.log(`${YELLOW}[!]${NC} ${msg}`);
|
|
25
|
+
const error = (msg) => console.error(`${RED}[x]${NC} ${msg}`);
|
|
26
|
+
|
|
27
|
+
// ---------------------------------------------------------------------------
|
|
28
|
+
// Usage
|
|
29
|
+
// ---------------------------------------------------------------------------
|
|
30
|
+
function usage() {
|
|
31
|
+
console.log(`Usage: just-works [OPTIONS]
|
|
32
|
+
|
|
33
|
+
Install just-works agents, skills, and commands globally.
|
|
34
|
+
|
|
35
|
+
Options:
|
|
36
|
+
--personal Use opinionated settings.json (permissions, hooks, sounds)
|
|
37
|
+
Default: minimal settings.json.default
|
|
38
|
+
--skip-config Skip installing settings.json
|
|
39
|
+
--skip-statusline Skip installing statusline-command.sh
|
|
40
|
+
--skip-skills-claude Skip installing Claude Code skills
|
|
41
|
+
--skip-skills-codex Skip installing Codex skills
|
|
42
|
+
--claude-only Install only Claude Code files (~/.claude/)
|
|
43
|
+
--codex-only Install only Codex files (~/.codex/)
|
|
44
|
+
--dry-run Show what would be installed without making changes
|
|
45
|
+
--no-backup Skip backup prompt, disable backups (for CI/non-interactive)
|
|
46
|
+
-v, --version Print version and exit
|
|
47
|
+
-h, --help Show this help message
|
|
48
|
+
|
|
49
|
+
What gets installed:
|
|
50
|
+
~/.claude/
|
|
51
|
+
agents/ Agent definitions (python-code-writer, prompt-writer)
|
|
52
|
+
skills/ Coding and prompting standards
|
|
53
|
+
commands/ Workflows (project-docs)
|
|
54
|
+
settings.json Permission and hook configuration
|
|
55
|
+
CLAUDE.md Global behavioral instructions
|
|
56
|
+
statusline-command.sh Status line script
|
|
57
|
+
|
|
58
|
+
~/.codex/
|
|
59
|
+
prompts/ Agent definitions (plan-reviewer, project-docs)
|
|
60
|
+
skills/ Coding and prompting standards
|
|
61
|
+
AGENTS.md Global behavioral instructions`);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// ---------------------------------------------------------------------------
|
|
65
|
+
// Parse arguments
|
|
66
|
+
// ---------------------------------------------------------------------------
|
|
67
|
+
const args = process.argv.slice(2);
|
|
68
|
+
const flags = {
|
|
69
|
+
personal: false,
|
|
70
|
+
dryRun: false,
|
|
71
|
+
claudeOnly: false,
|
|
72
|
+
codexOnly: false,
|
|
73
|
+
skipConfig: false,
|
|
74
|
+
skipStatusline: false,
|
|
75
|
+
skipSkillsClaude: false,
|
|
76
|
+
skipSkillsCodex: false,
|
|
77
|
+
noBackup: false,
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
for (const arg of args) {
|
|
81
|
+
switch (arg) {
|
|
82
|
+
case '--personal': flags.personal = true; break;
|
|
83
|
+
case '--dry-run': flags.dryRun = true; break;
|
|
84
|
+
case '--claude-only': flags.claudeOnly = true; break;
|
|
85
|
+
case '--codex-only': flags.codexOnly = true; break;
|
|
86
|
+
case '--skip-config': flags.skipConfig = true; break;
|
|
87
|
+
case '--skip-statusline': flags.skipStatusline = true; break;
|
|
88
|
+
case '--skip-skills-claude': flags.skipSkillsClaude = true; break;
|
|
89
|
+
case '--skip-skills-codex': flags.skipSkillsCodex = true; break;
|
|
90
|
+
case '--no-backup': flags.noBackup = true; break;
|
|
91
|
+
case '-v': case '--version': {
|
|
92
|
+
const pkg = JSON.parse(readFileSync(join(PACKAGE_ROOT, 'package.json'), 'utf8'));
|
|
93
|
+
console.log(pkg.version);
|
|
94
|
+
process.exit(0);
|
|
95
|
+
}
|
|
96
|
+
case '-h': case '--help':
|
|
97
|
+
usage();
|
|
98
|
+
process.exit(0);
|
|
99
|
+
default:
|
|
100
|
+
error(`Unknown option: ${arg}`);
|
|
101
|
+
usage();
|
|
102
|
+
process.exit(1);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
if (flags.claudeOnly && flags.codexOnly) {
|
|
107
|
+
error('--claude-only and --codex-only are mutually exclusive');
|
|
108
|
+
process.exit(1);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// ---------------------------------------------------------------------------
|
|
112
|
+
// Timestamp & paths
|
|
113
|
+
// ---------------------------------------------------------------------------
|
|
114
|
+
const now = new Date();
|
|
115
|
+
const pad = (n) => String(n).padStart(2, '0');
|
|
116
|
+
const TIMESTAMP = `${now.getFullYear()}${pad(now.getMonth() + 1)}${pad(now.getDate())}_${pad(now.getHours())}${pad(now.getMinutes())}${pad(now.getSeconds())}`;
|
|
117
|
+
|
|
118
|
+
const HOME = homedir();
|
|
119
|
+
const CLAUDE_HOME = join(HOME, '.claude');
|
|
120
|
+
const CODEX_HOME = join(HOME, '.codex');
|
|
121
|
+
const BACKUP_DIR = join(HOME, 'just-works-backups', TIMESTAMP);
|
|
122
|
+
|
|
123
|
+
// ---------------------------------------------------------------------------
|
|
124
|
+
// Core operations
|
|
125
|
+
// ---------------------------------------------------------------------------
|
|
126
|
+
function backupTarget(targetPath, backupDir, dryRun) {
|
|
127
|
+
if (!existsSync(targetPath)) return;
|
|
128
|
+
const relPath = relative(HOME, targetPath);
|
|
129
|
+
const backupPath = join(backupDir, relPath);
|
|
130
|
+
if (dryRun) {
|
|
131
|
+
warn(`Would back up: ${targetPath} -> ${backupPath}`);
|
|
132
|
+
} else {
|
|
133
|
+
mkdirSync(dirname(backupPath), { recursive: true });
|
|
134
|
+
if (statSync(targetPath).isDirectory()) {
|
|
135
|
+
mkdirSync(backupPath, { recursive: true });
|
|
136
|
+
cpSync(targetPath, backupPath, { recursive: true, force: true });
|
|
137
|
+
} else {
|
|
138
|
+
copyFileSync(targetPath, backupPath);
|
|
139
|
+
}
|
|
140
|
+
warn(`Backed up: ${targetPath} -> ${backupPath}`);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
function cleanTarget(targetPath, dryRun) {
|
|
145
|
+
if (!existsSync(targetPath)) return;
|
|
146
|
+
if (dryRun) {
|
|
147
|
+
warn(`Would remove: ${targetPath}`);
|
|
148
|
+
} else {
|
|
149
|
+
rmSync(targetPath, { recursive: true, force: true });
|
|
150
|
+
warn(`Removed: ${targetPath}`);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
function prepareTarget(targetPath, backupDir, doBackup, dryRun) {
|
|
155
|
+
if (doBackup) {
|
|
156
|
+
backupTarget(targetPath, backupDir, dryRun);
|
|
157
|
+
} else {
|
|
158
|
+
cleanTarget(targetPath, dryRun);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
function installDir(srcDir, destDir, label, opts) {
|
|
163
|
+
if (!existsSync(srcDir)) {
|
|
164
|
+
warn(`Source not found, skipping: ${srcDir}`);
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
prepareTarget(destDir, opts.backupDir, opts.doBackup, opts.dryRun);
|
|
168
|
+
if (opts.dryRun) {
|
|
169
|
+
info(`Would copy: ${srcDir}/ -> ${destDir}/`);
|
|
170
|
+
} else {
|
|
171
|
+
mkdirSync(destDir, { recursive: true });
|
|
172
|
+
cpSync(srcDir, destDir, { recursive: true, force: true });
|
|
173
|
+
info(`Installed: ${label} -> ${destDir}/`);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
function installFile(srcFile, destFile, label, opts) {
|
|
178
|
+
if (!existsSync(srcFile)) {
|
|
179
|
+
warn(`Source not found, skipping: ${srcFile}`);
|
|
180
|
+
return;
|
|
181
|
+
}
|
|
182
|
+
prepareTarget(destFile, opts.backupDir, opts.doBackup, opts.dryRun);
|
|
183
|
+
if (opts.dryRun) {
|
|
184
|
+
info(`Would copy: ${srcFile} -> ${destFile}`);
|
|
185
|
+
} else {
|
|
186
|
+
mkdirSync(dirname(destFile), { recursive: true });
|
|
187
|
+
copyFileSync(srcFile, destFile);
|
|
188
|
+
info(`Installed: ${label} -> ${destFile}`);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
// ---------------------------------------------------------------------------
|
|
193
|
+
// Interactive backup prompt
|
|
194
|
+
// ---------------------------------------------------------------------------
|
|
195
|
+
function askBackup() {
|
|
196
|
+
return new Promise((resolve) => {
|
|
197
|
+
const rl = createInterface({ input: process.stdin, output: process.stdout });
|
|
198
|
+
rl.question('Do you want to create backups? (Y/n) ', (answer) => {
|
|
199
|
+
rl.close();
|
|
200
|
+
const trimmed = (answer || 'Y').trim();
|
|
201
|
+
resolve(!/^[Nn]/.test(trimmed));
|
|
202
|
+
});
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
// ---------------------------------------------------------------------------
|
|
207
|
+
// Main
|
|
208
|
+
// ---------------------------------------------------------------------------
|
|
209
|
+
async function main() {
|
|
210
|
+
console.log(`${BOLD}just-works installer${NC}\n`);
|
|
211
|
+
|
|
212
|
+
// Determine backup behavior
|
|
213
|
+
let doBackup = true;
|
|
214
|
+
if (!flags.dryRun) {
|
|
215
|
+
if (flags.noBackup) {
|
|
216
|
+
doBackup = false;
|
|
217
|
+
} else if (!process.stdin.isTTY) {
|
|
218
|
+
doBackup = true;
|
|
219
|
+
warn('Non-interactive mode detected — backups enabled by default');
|
|
220
|
+
} else {
|
|
221
|
+
doBackup = await askBackup();
|
|
222
|
+
}
|
|
223
|
+
console.log();
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
const opts = { backupDir: BACKUP_DIR, doBackup, dryRun: flags.dryRun };
|
|
227
|
+
|
|
228
|
+
// --- Claude Code ---
|
|
229
|
+
if (!flags.codexOnly) {
|
|
230
|
+
console.log(`${BOLD}Claude Code${NC}`);
|
|
231
|
+
installDir(join(PACKAGE_ROOT, '.claude', 'agents'), join(CLAUDE_HOME, 'agents'), 'agents', opts);
|
|
232
|
+
if (!flags.skipSkillsClaude) {
|
|
233
|
+
installDir(join(PACKAGE_ROOT, '.claude', 'skills'), join(CLAUDE_HOME, 'skills'), 'skills', opts);
|
|
234
|
+
} else {
|
|
235
|
+
info('Skipping Claude skills (--skip-skills-claude)');
|
|
236
|
+
}
|
|
237
|
+
installDir(join(PACKAGE_ROOT, '.claude', 'commands'), join(CLAUDE_HOME, 'commands'), 'commands', opts);
|
|
238
|
+
|
|
239
|
+
if (!flags.skipConfig) {
|
|
240
|
+
if (flags.personal) {
|
|
241
|
+
installFile(join(PACKAGE_ROOT, '.claude', 'settings.json'), join(CLAUDE_HOME, 'settings.json'), 'settings.json (personal)', opts);
|
|
242
|
+
} else {
|
|
243
|
+
installFile(join(PACKAGE_ROOT, '.claude', 'settings.json.default'), join(CLAUDE_HOME, 'settings.json'), 'settings.json (default)', opts);
|
|
244
|
+
}
|
|
245
|
+
} else {
|
|
246
|
+
info('Skipping settings.json (--skip-config)');
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
installFile(join(PACKAGE_ROOT, 'CLAUDE.md'), join(CLAUDE_HOME, 'CLAUDE.md'), 'CLAUDE.md', opts);
|
|
250
|
+
if (!flags.skipStatusline) {
|
|
251
|
+
installFile(join(PACKAGE_ROOT, '.claude', 'statusline-command.sh'), join(CLAUDE_HOME, 'statusline-command.sh'), 'statusline-command.sh', opts);
|
|
252
|
+
} else {
|
|
253
|
+
info('Skipping statusline-command.sh (--skip-statusline)');
|
|
254
|
+
}
|
|
255
|
+
console.log();
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
// --- Codex ---
|
|
259
|
+
if (!flags.claudeOnly) {
|
|
260
|
+
console.log(`${BOLD}Codex${NC}`);
|
|
261
|
+
installDir(join(PACKAGE_ROOT, '.codex', 'prompts'), join(CODEX_HOME, 'prompts'), 'prompts', opts);
|
|
262
|
+
if (!flags.skipSkillsCodex) {
|
|
263
|
+
installDir(join(PACKAGE_ROOT, '.codex', 'skills'), join(CODEX_HOME, 'skills'), 'skills', opts);
|
|
264
|
+
} else {
|
|
265
|
+
info('Skipping Codex skills (--skip-skills-codex)');
|
|
266
|
+
}
|
|
267
|
+
installFile(join(PACKAGE_ROOT, 'AGENTS.md'), join(CODEX_HOME, 'AGENTS.md'), 'AGENTS.md', opts);
|
|
268
|
+
console.log();
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
// --- Summary ---
|
|
272
|
+
if (flags.dryRun) {
|
|
273
|
+
console.log(`${YELLOW}Dry run complete — no files were modified.${NC}`);
|
|
274
|
+
} else {
|
|
275
|
+
console.log(`${GREEN}Done.${NC}`);
|
|
276
|
+
if (doBackup) {
|
|
277
|
+
console.log(` Backups: ${BACKUP_DIR}/`);
|
|
278
|
+
}
|
|
279
|
+
if (!flags.codexOnly) {
|
|
280
|
+
console.log(` Claude Code: ${CLAUDE_HOME}/`);
|
|
281
|
+
}
|
|
282
|
+
if (!flags.claudeOnly) {
|
|
283
|
+
console.log(` Codex: ${CODEX_HOME}/`);
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
main().catch((err) => {
|
|
289
|
+
error(err.message);
|
|
290
|
+
process.exit(1);
|
|
291
|
+
});
|
package/package.json
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@dynokostya/just-works",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Drop-in AI agent workflows, coding skills, and prompt standards for Claude Code and OpenAI Codex",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"just-works": "bin/cli.mjs"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"bin/",
|
|
11
|
+
".claude/agents/",
|
|
12
|
+
".claude/commands/",
|
|
13
|
+
".claude/skills/",
|
|
14
|
+
".claude/settings.json",
|
|
15
|
+
".claude/settings.json.default",
|
|
16
|
+
".claude/statusline-command.sh",
|
|
17
|
+
".codex/prompts/",
|
|
18
|
+
".codex/skills/",
|
|
19
|
+
"CLAUDE.md",
|
|
20
|
+
"AGENTS.md",
|
|
21
|
+
"LICENSE"
|
|
22
|
+
],
|
|
23
|
+
"engines": {
|
|
24
|
+
"node": ">=18.0.0"
|
|
25
|
+
},
|
|
26
|
+
"keywords": [
|
|
27
|
+
"claude",
|
|
28
|
+
"codex",
|
|
29
|
+
"ai",
|
|
30
|
+
"agents",
|
|
31
|
+
"skills",
|
|
32
|
+
"config"
|
|
33
|
+
],
|
|
34
|
+
"license": "Apache-2.0",
|
|
35
|
+
"repository": {
|
|
36
|
+
"type": "git",
|
|
37
|
+
"url": "https://github.com/dynokostya/just-works.git"
|
|
38
|
+
}
|
|
39
|
+
}
|