xiaohongshu
xiaohongshu
local-env
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.
Full skill instructions
Help with local development environment tasks for daily-api.
PostgreSQL runs locally via Docker in a k8s container.
docker ps --format "table {{.Names}}" | grep "k8s_app_postgres"
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
Payment status for opportunities is tracked on the Organization level via recruiterSubscriptionFlags. Opportunities also store subscription info in their flags column.
| 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 |
| Field | Description |
|---|---|
plan | Must match a priceId from the org's subscription items |
batchSize | Number of candidates per batch |
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';
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';
The opportunity table uses a state column (integer) to track lifecycle status. Values come from OpportunityState enum in @dailydotdev/schema.
| 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 |
-- 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;
When the user asks for local environment help:
Common requests:
When handling requests not covered in this skill, use these techniques to discover the correct schema:
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.
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
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;
state not status)jsonb_build_object() for updates, -> or ->> for queries"organizationId")This skill should evolve over time. When you discover new local environment operations, common testing patterns, or useful queries:
If a user asks for something not covered here, help them and then offer to add it to this skill for future use.
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience