unified-dev-env
Skill1 starsChanged 7 months agoMITView on GitHub
Set up and use a unified dev environment where all services, logs,
- Installs packages
In this repository50 other files it gives its agents.
- ab-test-setupSkill
- Agent DevelopmentSkill
- analytics-trackingSkill
- autonomous-spec-runsSkill
- backend-patternsSkill
- claude-opus-4-5-migrationSkill
- codemapsSkill
- Command DevelopmentSkill
- competitor-alternativesSkill
- conciseSkill
- continuous-learning-v2Skill
- coolify-vpsSkill
- copy-editingSkill
- copywritingSkill
- create-agentic-specSkill
- create-specSkill
- crmSkill
- decision-toolkitSkill
- email-replySkill
- email-sequenceSkill
- form-croSkill
- free-tool-strategySkill
- frontend-patternsSkill
- indexnowSkill
- launch-strategySkill
- marketing-ideasSkill
- marketing-psychologySkill
- MCP IntegrationSkill
- og-imageSkill
- onboarding-croSkill
- page-agentSkill
- page-croSkill
- paid-adsSkill
- paywall-upgrade-croSkill
- popup-croSkill
- postgres-patternsSkill
- pricing-strategySkill
- profile-learnerSkill
- programmatic-seoSkill
- qa-deliverablesSkill
- referral-programSkill
- schema-markupSkill
- security-reviewSkill
- seo-auditSkill
- signup-flow-croSkill
- social-contentSkill
- strategic-compactSkill
- stripe-best-practicesSkill
- tdd-workflowSkill
- upwork-listingsSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 6 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 18
Run this section once per project to implement the pattern.
- Very specific: line 59
Add one runProc() call per service.
- Distinctive: line 98
Start Chrome with CDP enabled:
- Very specific: line 141
Use this section every session.
- Distinctive: line 165
If not already running:
- Distinctive: line 187
Always restart everything together — partial restarts leave connections dangling:
- Distinctive: line 201
Write or edit code
- Distinctive: line 203
If frontend change: attach browser (see above), open the relevant page
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
unified-dev-env
A pattern for agentic development: all services, logs, and browser console stream into one observable place. An agent can write code, read logs, attach a browser, and verify visually — all from a single log stream, without context-switching.
Setup
Run this section once per project to implement the pattern.
What you'll build
- A process manager script (
scripts/dev-logs.ts) that starts all services and multiplexes their stdout/stderr into one prefixed, timestamped stream - A rotating log file with a stable symlink (
logs/dev-latest.log) the agent always reads — never guess which rotation file is current - An optional CDP browser tap: attaches to Chrome/Chromium and streams console output into the same log stream
Prerequisites
- Bun (or Node.js) installed
- A multi-service project (2+ processes)
- Chrome, Chrome Beta, or Chromium (optional — for browser tap)
Step 1: Install dependencies
bun add rotating-file-stream ws
bun add -d @types/wsFor Node.js: npm install rotating-file-stream ws (same packages).
Step 2: Copy the reference implementation
Copy dev-logs.reference.ts (in this skill directory) to scripts/dev-logs.ts in your project. Then edit the Config and Start your services sections:
// ── Config ────────────────────────────────────────────────────────────────────
const ROOT = resolve(import.meta.dir, ".."); // project root relative to scripts/
const PROJECT = "myproject"; // used for /tmp dir name// ── Start your services here ──────────────────────────────────────────────────
const children = [
runProc("server", "bun run src/index.ts", join(ROOT, "packages/server")),
runProc("web", "bun run dev", join(ROOT, "packages/web")),
];Add one runProc() call per service. The first argument becomes the log prefix ([server], [web], etc.) — keep it short.
Step 3: Wire into package.json
{
"scripts": {
"dev": "bun scripts/dev-logs.ts"
}
}Step 4: Add logs/ to .gitignore
logs/Step 5: Validate
bun run devIn another terminal:
tail -n 50 logs/dev-latest.logExpected output:
2026-04-20T10:00:00.000Z [server] listening on :3001
2026-04-20T10:00:00.100Z [web] ready on http://localhost:3000Step 6 (optional): Attach the browser tap
Start Chrome with CDP enabled:
# macOS — Chrome Beta
"/Applications/Google Chrome Beta.app/Contents/MacOS/Google Chrome Beta" \
--remote-debugging-port=9222 \
--user-data-dir="$HOME/.chrome-beta-profile" &
# Linux
google-chrome --remote-debugging-port=9222 --user-data-dir=/tmp/chrome-dev &Open a tab to your app (e.g. http://localhost:3000). The script polls CDP every 3 seconds and logs [browser] attached to tab: … when it connects. Browser console logs, network errors, and JS exceptions then appear in dev-latest.log.
Step 7: Add CLAUDE.md instructions
Paste this into your project's CLAUDE.md so the agent knows how to use the environment:
## Dev logs (unified stream)
`bun run dev` starts all services through `scripts/dev-logs.ts`:
- Output is prefixed: `[server]`, `[web]`, `[browser]`, `[dev-logs]`
- Rotating log: 5 MB × 10 files, gzipped on rotate
- Stable symlink: `logs/dev-latest.log` — always read this path
**Agent access:**
```bash
tail -n 200 logs/dev-latest.log # recent context
tail -f logs/dev-latest.log # live follow
grep -h ERROR logs/dev-*.log | tail -50 # search across rotations
```
**Restart:** always restart the full environment, never individual services:
```bash
pkill -f "scripts/dev-logs" 2>/dev/null; sleep 2; bun run dev &
```Agent Reference
Use this section every session. Always read dev-latest.log — never guess filenames.
Log access
tail -n 200 logs/dev-latest.log # recent context (start here)
tail -f logs/dev-latest.log # live follow while testing
grep -h ERROR logs/dev-*.log | tail -50 # search across all rotations
grep "\[browser\]" logs/dev-latest.log # browser-only linesLog prefixes
| Prefix | Source |
[server] | Backend process |
[web] | Frontend dev server |
[browser] | Chrome console/errors via CDP |
[dev-logs] | Process manager messages |
Project-specific prefixes (e.g. [tauri], [worker]) are defined in scripts/dev-logs.ts.
Attach the browser tap
If not already running:
# macOS — Chrome Beta
"/Applications/Google Chrome Beta.app/Contents/MacOS/Google Chrome Beta" \
--remote-debugging-port=9222 \
--user-data-dir="$HOME/.chrome-beta-profile" &
# Linux
google-chrome --remote-debugging-port=9222 --user-data-dir=/tmp/chrome-dev &Open a tab to your app. The script auto-attaches within 3 seconds — confirm with:
grep "browser.*attached" logs/dev-latest.log | tail -1Once attached, browser console.log, errors, and JS exceptions stream as [browser] [log|warn|error|exception] … lines.
Restart the environment
Always restart everything together — partial restarts leave connections dangling:
pkill -f "scripts/dev-logs" 2>/dev/null
pkill -f "packages/server" 2>/dev/null
pkill -f "packages/web" 2>/dev/null
sleep 2
bun run dev &Adjust the pkill patterns to match your actual service entrypoints.
Agent QA loop
- Write or edit code
tail -n 100 logs/dev-latest.log— check for errors or unexpected output- If frontend change: attach browser (see above), open the relevant page
grep "\[browser\].*error\|exception" logs/dev-latest.log— check for JS errors- Fix and repeat
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

