Automated summary
Manages the local daily-api development environment: running PostgreSQL queries in the Docker container, seeding fake Paddle payments, and resetting test data.
Strengths
- Provides copy-paste docker exec/psql commands, including for multi-line queries.
- Documents the exact JSONB fields needed to fake a Paddle subscription at organization and opportunity level.
- Includes reset queries and the OpportunityState enum value mapping.
- Explains how organization subscription data and opportunity flags must stay in sync.
Limitations
- Tightly coupled to daily-api's schema and container naming, so it is not portable as-is.
- Assumes a local Docker/k8s PostgreSQL and psql access, with no safety checks on destructive UPDATEs.
- Does not cover migrations, backups, or shared environments.
Use when you need to inspect or mutate the local daily-api PostgreSQL database, simulate payment state, or change an opportunity's lifecycle state for testing.
Do not use against shared, staging, or production databases, or for schema migrations.
Security analysis
CautionAll actions are local development housekeeping: finding a Postgres container, running SQL, and seeding fake subscription/state data for testing. There is no network exfiltration, no curl|sh, no obfuscated payloads, and no attempt to disable safety controls. The risk is 'caution' because the skill deliberately uses powerful tools (docker exec, superuser SQL, destructive UPDATE/reset queries) and explicitly manufactures 'active' payment flags to bypass payment validation, with no environment guardrail to stop a mis-targeted run against shared or production data.
- •Executes arbitrary SQL via `docker exec ... psql -U postgres` including UPDATE statements that mutate organization/opportunity payment and lifecycle state
- •Skill's purpose is to fabricate 'active' payment/subscription state (`recruiterSubscriptionFlags`, paddle price IDs) so payment validation passes — legitimate for local test data but is a payment-logic bypass if ever pointed at a non-local environment
- •No guardrail confining commands to a local/dev database; container lookup greps for `k8s_app_postgres` but nothing prevents running against a remote or production kube context or DATABASE_URL
- •Uses the `postgres` superuser role with no read-only or scoped credentials
Examples
Find the local postgres container and show me the last 5 opportunities with their id, title, and state.Set up a fake active Paddle subscription for organization org_123 with 5 seats, then show me the updated recruiterSubscriptionFlags.Set opportunity opp_456 to LIVE and give it a batchSize of 50, making sure its organization has an active fake payment plan that matches.name: local-env description: Local environment management - run SQL queries, set up fake payments, reset test data. Use when the user needs help with local database operations or test data setup.
Local Environment Management
Help with local development environment tasks for daily-api.
Database Access
PostgreSQL runs locally via Docker in a k8s container.
Finding the Container
docker ps --format "table {{.Names}}" | grep "k8s_app_postgres"
Running Queries
docker exec <CONTAINER_NAME> psql -U postgres -d api -c "YOUR SQL QUERY"
For multi-line queries:
docker exec <CONTAINER_NAME> psql -U postgres -d api <<'EOF'
SELECT * FROM users LIMIT 1;
EOF
Fake Payment Setup
Payment status for opportunities is tracked on the Organization level via recruiterSubscriptionFlags. Opportunities also store subscription info in their flags column.
Organization Subscription Fields
| Field | Description |
|-------|-------------|
| status | Must be 'active' for payment validation to pass |
| provider | Use 'paddle' |
| items[].quantity | Number of opportunity "seats" available |
| items[].priceId | Price ID that opportunities reference |
Opportunity Flags Fields
| Field | Description |
|-------|-------------|
| plan | Must match a priceId from the org's subscription items |
| batchSize | Number of candidates per batch |
Fake Payment for Organization
UPDATE organization
SET "recruiterSubscriptionFlags" = jsonb_build_object(
'status', 'active',
'provider', 'paddle',
'subscriptionId', 'fake_sub_123',
'createdAt', now(),
'updatedAt', now(),
'items', jsonb_build_array(
jsonb_build_object('priceId', 'pri_fake_123', 'quantity', 5)
)
)
WHERE id = 'ORGANIZATION_ID';
Reset: UPDATE organization SET "recruiterSubscriptionFlags" = '{}' WHERE id = 'ORGANIZATION_ID';
Fake Payment for Opportunity
Requires updating both the organization AND the opportunity:
-- Step 1: Update organization subscription
UPDATE organization
SET "recruiterSubscriptionFlags" = jsonb_build_object(
'status', 'active',
'provider', 'paddle',
'subscriptionId', 'fake_sub_123',
'createdAt', now(),
'updatedAt', now(),
'items', jsonb_build_array(
jsonb_build_object('priceId', 'pri_fake_123', 'quantity', 5)
)
)
WHERE id = (SELECT "organizationId" FROM opportunity WHERE id = 'OPPORTUNITY_ID');
-- Step 2: Update opportunity flags
UPDATE opportunity
SET flags = flags || jsonb_build_object(
'plan', 'pri_fake_123',
'batchSize', 50
)
WHERE id = 'OPPORTUNITY_ID';
Reset:
UPDATE organization SET "recruiterSubscriptionFlags" = '{}'
WHERE id = (SELECT "organizationId" FROM opportunity WHERE id = 'OPPORTUNITY_ID');
UPDATE opportunity SET flags = flags - 'plan' - 'batchSize'
WHERE id = 'OPPORTUNITY_ID';
Opportunity State Management
The opportunity table uses a state column (integer) to track lifecycle status. Values come from OpportunityState enum in @dailydotdev/schema.
OpportunityState Values
| Value | Name | Description | |-------|------|-------------| | 0 | UNSPECIFIED | Default/unset | | 1 | DRAFT | Not yet published | | 2 | LIVE | Active and visible | | 3 | CLOSED | No longer active | | 4 | IN_REVIEW | Pending review |
Update Opportunity State
-- Set to LIVE
UPDATE opportunity SET state = 2 WHERE id = 'OPPORTUNITY_ID' RETURNING id, state, title;
-- Set to DRAFT
UPDATE opportunity SET state = 1 WHERE id = 'OPPORTUNITY_ID' RETURNING id, state, title;
-- Set to CLOSED
UPDATE opportunity SET state = 3 WHERE id = 'OPPORTUNITY_ID' RETURNING id, state, title;
-- Set to IN_REVIEW
UPDATE opportunity SET state = 4 WHERE id = 'OPPORTUNITY_ID' RETURNING id, state, title;
Instructions
When the user asks for local environment help:
- For SQL queries: First find the postgres container, then execute via docker exec
- For fake payments: Determine if they're providing an opportunity ID or organization ID, run the appropriate SQL
- Always verify: After changes, run a SELECT to confirm
- Ask if unclear: If the request is ambiguous, ask clarifying questions
Common requests:
- "Set up fake payment for opportunity X" → Run both org and opportunity updates
- "Set up fake payment for org X" → Run only org update
- "Run SQL: ..." → Execute via docker
- "Reset payment for X" → Run reset queries
- "Check subscription for X" → Query and display current state
- "Update opp X to live/draft/closed" → Update opportunity state
Discovering Schema Information
When handling requests not covered in this skill, use these techniques to discover the correct schema:
1. Check Entity Definitions
Entity files define column names and types:
# Find the entity file
grep -r "TableName" src/entity/ --include="*.ts"
# Read the entity to see column definitions
Key location: src/entity/ - TypeORM entities with @Column decorators show actual DB column names.
2. Find Enum Values
Many columns use integer enums from @dailydotdev/schema. To find enum values:
# Search for enum usage in codebase
grep -r "EnumName\." src/ --include="*.ts" | head -20
# Find enum definition in schema package
grep -r "EnumName" node_modules/@dailydotdev/schema/dist/ --include="*.d.ts"
Common enum locations: node_modules/@dailydotdev/schema/dist/daily-api/*_pb.d.ts
3. Query Existing Data
When unsure about column names or values:
-- Check table structure
\d tablename
-- See existing values
SELECT DISTINCT column_name FROM tablename LIMIT 10;
-- Inspect a specific row
SELECT * FROM tablename WHERE id = 'xxx' LIMIT 1;
4. Common Gotchas
- Column naming: Entity property names may differ from DB columns (e.g.,
statenotstatus) - Integer enums: Many "status" fields are integers, not strings - find the enum definition
- JSONB fields: Use
jsonb_build_object()for updates,->or->>for queries - Quoted columns: PostgreSQL requires double quotes for camelCase columns (e.g.,
"organizationId")
Continuous Improvement
This skill should evolve over time. When you discover new local environment operations, common testing patterns, or useful queries:
- Add them to this file - Update the SKILL.md with new sections or examples
- Keep it practical - Focus on operations that are frequently needed
- Document the why - Explain what fields mean and why certain values are used
If a user asks for something not covered here, help them and then offer to add it to this skill for future use.
From the file to a first result
The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.
View the source and supporting filesThis download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.
1. Download the file
Download SKILL.mdFrom the root of a test project, save the file as .skill-downloads/local-environment-management-mmbizkuf/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.
Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.
mkdir -p '.skill-downloads/local-environment-management-mmbizkuf' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/local-environment-management-mmbizkuf/download' --output '.skill-downloads/local-environment-management-mmbizkuf/SKILL.md.part' && mv '.skill-downloads/local-environment-management-mmbizkuf/SKILL.md.part' '.skill-downloads/local-environment-management-mmbizkuf/SKILL.md'2. Check prerequisites
Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.
No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.
The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.
3. Load the skill
After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.
Claude Code
test -f '.skill-downloads/local-environment-management-mmbizkuf/SKILL.md' && test -s '.skill-downloads/local-environment-management-mmbizkuf/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/local-env' && cp -R '.skill-downloads/local-environment-management-mmbizkuf' '.claude/skills/local-env'Cursor
test -f '.skill-downloads/local-environment-management-mmbizkuf/SKILL.md' && test -s '.skill-downloads/local-environment-management-mmbizkuf/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/local-env' && cp -R '.skill-downloads/local-environment-management-mmbizkuf' '.cursor/skills/local-env'Codex
test -f '.skill-downloads/local-environment-management-mmbizkuf/SKILL.md' && test -s '.skill-downloads/local-environment-management-mmbizkuf/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/local-env' && cp -R '.skill-downloads/local-environment-management-mmbizkuf' '.agents/skills/local-env'OpenSkills
OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.
Official OpenSkills installationopenskills install './.skill-downloads/local-environment-management-mmbizkuf'openskills read 'local-environment-management-mmbizkuf'Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.
For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.
openskills syncManual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.
4. Try a first task
Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:
Read .skill-downloads/local-environment-management-mmbizkuf/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.
React Hook Form Best Practices
Development
Master React Hook Form: avoid anti-patterns, manage subscriptions, and handle reset, dirty state, and controlled inputs correctly.
Emotion to Mantine Migration
Development
Migrate Emotion styled-components to Mantine components with style props and CSS modules. Use when converting .styled.tsx files or removing @emotion imports.
Scope Creep Detector
Development
Analyzes git diffs against a stated intent to detect scope creep, unrelated files, broad PRs, and oversized changes, then suggests keep, split, or justify actions.