coolify-tweaks
AGENTS.md173 starsChanged 6 months agoMITView on GitHub
Coolify Tweaks is a userstyle that enhances Coolify's UI. Built as a Turborepo monorepo with all internal packages scoped under @repo/*. Filter syntax: pnpm --filter @repo/style dev Sass + PostCSS + LightningCSS pipeline that produces the Coolify theme. Entry: src/main.scss → Output: dist/ Local workflow: Nitro server serving dynamic style builds with TweakCN theme injection. In dev mode, reads CSS directly from the style app's dist/ folder for instant feedback. Theme Injection: The Style app's PostCSS plugin injects markers around…
- Reads credentials
- Installs packages
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,700 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository9 other files it gives its agents.
- .agents/skills/vercel-composition-patterns/AGENTS.mdAGENTS.md
- .agents/skills/vercel-react-best-practices/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- ai-sdkSkill
- create-changesetSkill
- turborepoSkill
- vercel-composition-patternsSkill
- vercel-react-best-practicesSkill
- web-design-guidelinesSkill
The file
We split this AGENTS.md into the rules it gives an agent
7 rules. About 0 are common, 3 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 178
When requested to make a release:
- Distinctive: line 182
Update the empty changeset with release content (keep it simple and clear)
- Very specific: line 183
Run pnpm run version to apply the version bump
- Distinctive: line 184
Ask user to review, then commit
- Very specific: line 188
Use @/env import for environment variables (no direct process.env)
- Very specific: line 190
Use type imports: import type { Foo } from 'bar'
- Very specific: line 191
Run pnpm lint && pnpm format && pnpm typecheck && pnpm check:spelling before pushing
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md 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
AGENTS.md
Coolify Tweaks is a userstyle that enhances Coolify's UI. Built as a Turborepo monorepo with all internal packages scoped under @repo/*.
Repository Structure
apps/
├── api/ # @repo/api - Nitro server for dynamic style builds (port 8080)
├── docs/ # @repo/docs - Next.js 16 + Fumadocs documentation site (port 3000)
└── style/ # @repo/style - Sass + PostCSS + LightningCSS pipeline
packages/
├── ui/ # @repo/ui - Shared React components (shadcn/ui)
└── validators/ # @repo/validators - Zod validation schemas
tooling/ # Shared configs (@repo/eslint-config, @repo/prettier-config, @repo/tsconfig, etc.)Quick Start
pnpm install
cp .env.example .env # Configure OPENAI_API_KEY, NEXT_PUBLIC_API_URL, etc.
pnpm dev # Run all appsKey Scripts
| Script | Description |
pnpm dev | Run all apps in watch mode |
pnpm dev:style | Style app only |
pnpm dev:api | API server only |
pnpm dev:web | Docs site only |
pnpm build | Build all apps |
pnpm lint | ESLint (lint:fix to fix) |
pnpm lint:ws | Validate workspace dependencies (sherif) |
pnpm format | Prettier check (format:fix to fix) |
pnpm typecheck | TypeScript check |
pnpm check:spelling | CSpell |
pnpm ui-add | Add shadcn/ui components to @repo/ui |
pnpm changeset | Create a changeset for versioning |
pnpm version | Apply version bumps from changesets |
Filter syntax: pnpm --filter @repo/style dev
Style App (apps/style/)
Sass + PostCSS + LightningCSS pipeline that produces the Coolify theme.
Entry: src/main.scss → Output: dist/
src/
├── components/ # Component styling (sidebar, cards, navbar, etc.)
├── pages/ # Page-specific tweaks (deployments, resources, onboarding)
├── theme/ # Variables, base reset, typography
├── utilities/ # Misc helpers and overrides
├── _globals.scss
├── _mixins.scss
└── main.scss # Entry point that imports everything
plugins/postcss/ # Custom PostCSS plugins (banner, theme identifier, moz wrapping)
scripts/ # Build and watch helpersOutputs:
dist/main.user.css- Stylus-friendly with userstyle metadatadist/main.css- Raw CSS bundle for Traefik dynamic-config install
Local workflow:
- Start watcher:
pnpm dev:style - Start API:
pnpm dev:api - Install in Stylus from
http://localhost:8080/release/latest/?asset=main.user.css - Edit Sass partials - changes reflect immediately
API App (apps/api/)
Nitro server serving dynamic style builds with TweakCN theme injection. In dev mode, reads CSS directly from the style app's dist/ folder for instant feedback.
src/
├── routes/
│ ├── index.ts # Root route
│ ├── health/index.ts # Health check
│ └── release/[tag]/index.ts # Release proxy
├── middleware/cors.ts # CORS configuration
├── utils/
│ ├── css-compiler.ts # transformCss() - Lightning CSS transforms
│ ├── css-transformer.ts # cssVarsToCss() - variable conversion
│ └── themes.ts # getThemeCss(), processContent()
└── config.ts # App configurationRoutes:
GET /release/latest/?asset=main.css- Latest CSS bundleGET /release/[tag]/[asset]- Specific release assetsGET /health- Health check
Theme Injection:
The Style app's PostCSS plugin injects markers around CSS variables:
/* ==UI-THEME-VARS:START== */
:root { --background: #fdfdfd; ... }
.dark { --background: #1f1c23; ... }
/* ==UI-THEME-VARS:END== */Request with ?theme=<theme-id> to apply a TweakCN theme:
- Fetches base CSS from GitHub releases
- Fetches theme data from TweakCN using theme ID
- Converts theme CSS variables using
cssVarsToCss() - Transforms CSS using Lightning CSS for browser compatibility
- Replaces content between
UI-THEME-VARSmarkers - Updates
updateURLin userstyle metadata to preserve theme parameter
Docs App (apps/docs/)
content/docs/ # MDX documentation files
scripts/ # generate-docs, sync-changelog, lint helpers
src/app/
├── (home)/ # Marketing homepage
├── docs/ # Fumadocs routes
├── api/ # Next API routes (chat, search)
└── og/ # OG image generationPre-build scripts: pnpm --filter @repo/docs run build:pre (generates OpenAPI docs, syncs changelog)
Git Workflow
Branch naming:
feat/- New features (e.g.,feat/new-theme-toggle)fix/- Bug fixes (e.g.,fix/docs-typo)docs/- Documentation changeschore/- Maintenance tasksrefactor/- Code refactoring
Commit messages (Conventional Commits, validated by commitlint):
<type>(<scope>): <description>Types: feat, fix, docs, style, refactor, perf, test, chore
Examples:
feat(style): add dark mode toggle
fix(api): correct theme injection for Safari
docs: update installation guideCI/CD
CI (.github/workflows/ci.yml) - Runs on PRs and pushes to main/dev:
lint-pnpm lintandpnpm lint:ws(workspace linting)format-pnpm formatcspell-pnpm check:spellingtypecheck-pnpm typecheck
Release (.github/workflows/release.yml) - Runs on push to dev:
- Builds all apps
- Creates/updates "Version Packages" PR via changesets/action
- On publish, uploads style dist to GitHub Releases
Releases
When requested to make a release:
- Gather git commits since the last release tag
- Run
pnpm changeset --empty - Update the empty changeset with release content (keep it simple and clear)
- Run
pnpm run versionto apply the version bump - Ask user to review, then commit
Project-Specific Rules
- Use
@/envimport for environment variables (no directprocess.env) - Unused variables must be prefixed with
_ - Use type imports:
import type { Foo } from 'bar' - Run
pnpm lint && pnpm format && pnpm typecheck && pnpm check:spellingbefore pushing
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.

