db
Skill136 starsChanged 3 days agoMITView on GitHub
Safe Postgres CLI. Reads DATABASE_URL from .env, runs SQL, prints JSON. Read-only by default.
- Reads credentials
In this repository15 other files it gives its agents.
- AGENTS.mdAGENTS.md
- acp-connectorSkill
- applySkill
- browser-automationSkill
- dailySkill
- dashboardSkill
- memorySkill
- newsSkill
- onboardingSkill
- polishSkill
- profileSkill
- radarSkill
- referralsSkill
- strategySkill
- targetsSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 0 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
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
- Very specific: line 13
Read-only by default. Writes require explicit --write.
- Very specific: line 16
Never prints the connection string.
- Very specific: line 40
Never echo
DATABASE_URL: If you need to confirm connectivity, use --ping (masked). - Very specific: line 42
JSONB access: use data->'key' (jsonb) or data->>'key' (text).
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 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
db — Postgres CLI for agents
scripts/db.js is the single entry point to the database. Use it instead of psql or inline pg scripts.
Why
- Reads
DATABASE_URLfrom.envautomatically. No manual sourcing, no leaked credentials. - Read-only by default. Writes require explicit
--write. Prevents accidental destructive SQL. - JSON output. Easy to parse, token-efficient.
- Portable. Works on any machine that cloned the repo and ran onboarding (no
psqlin PATH required). - Never prints the connection string.
--pingshows maskeduser@host/dbonly.
Commands
# Read (default, JSON array out)
node scripts/db.js "SELECT * FROM users WHERE id = <user_id>"
node scripts/db.js "SELECT data->'profile' AS profile FROM users WHERE id = <user_id>"
# Write (requires --write)
node scripts/db.js "INSERT INTO applications (user_id, platform, company, role, url, status, data) VALUES (<user_id>, 'linkedin', 'Acme', 'Eng Manager', 'https://...', 'applied', '{}'::jsonb)" --write
node scripts/db.js "UPDATE users SET data = jsonb_set(data, '{linkedin_profile}', '\"https://...\"') WHERE id = <user_id>" --write
# Introspection
node scripts/db.js --tables
node scripts/db.js --schema applications
node scripts/db.js --pingRules
- Always use this CLI for DB access. Never write inline
pgscripts in skills, never callpsqldirectly. - Read-only by default. A statement that does not start with
SELECT/WITH/SHOW/EXPLAIN/VALUES/DESCRIBEis refused without--write. - Output is JSON. SELECTs print
[{...}, ...]. Writes print{rowCount, command}. - Never echo
DATABASE_URL. If you need to confirm connectivity, use--ping(masked). - Parametrize when needed by interpolating safely into the SQL string. This CLI has no parameter binding for CLI args; for user-supplied strings, escape single quotes (
'->''). - JSONB access: use
data->'key'(jsonb) ordata->>'key'(text). Usejsonb_setfor updates.
Schema reference
Tables live in public. Discover with --tables and --schema <table>. Known tables:
users— single row (repo owner).dataJSONB holdsprofile,job_preferences,style_profile,platforms,linkedin_profile.applications—user_id, platform, company, role, url, status, applied_at, data.messages— recruiter / contact messages.
applications table
Columns: id, user_id, platform, company, role, url, status, applied_at, data
Platforms used:
linkedin= Easy Apply jobslinkedin_invite= connection requestsemail= direct emails to recruitersteamtailor= applications via Teamtailor (with LinkedIn auth, email verification, Connect)humand= applications via Humand.co<company>_career_site, etc. = specific career sites
Status values (pipeline stages, canonical):
Active stages (left to right in the kanban):
discovered= found but no action takencontacted= invite/email sent, no formal applicationapplied= application submittedin_review= company reviewing, no responsescreening= screening call scheduled/doneinterview= technical interview in progressoffer= offer received, negotiatinghired= accepted, starting
Closed stages (shown with --closed):
rejected= company rejectedwithdrawn= user withdrewskipped= decided not to apply / not a fit
data JSONB: include source, match (high/medium/low), location, tech array, stage_history array (audit trail of status changes), and any relevant metadata.
Helper library
lib/browser-helpers.js provides atomic helpers that prevent session death between browser calls:
const {
goto, evalJS, evalJSON, clickByText,
waitFor, waitForSelector, waitForText,
snapshotReliable, dismissModals,
dbQuery, dbWrite,
// Atomic helpers (prevent session death between calls)
openAndEval, openAndEvalJSON,
gotoAndEval, gotoAndEvalJSON,
} = require('./lib/browser-helpers');Atomic helpers chain open/goto + eval in a single shell command to prevent session death between calls:
// Open browser + extract in one call (no session death risk)
const jobs = openAndEvalJSON(
'https://www.linkedin.com/jobs/search/?keywords=...',
`(function(){ ... return JSON.stringify(...); })()`,
{ session: 'my-session', headed: true }
);
// Navigate + extract in one call (browser already open)
const emails = gotoAndEvalJSON(
'https://mail.google.com/mail/u/0/#all',
`(function(){ ... return JSON.stringify(...); })()`,
{ session: 'my-session' }
);Dependencies
- Depends on
onboarding(.env+ DB must exist). - Consumed by every flow that reads or writes DB:
profile,apply,news,daily.
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.

