skills/integrations/notion-tools/update-variables-in-notion/SKILL.md
Extract variables from Beam prompt chain files (.md) and sync to Notion database. Load when user mentions "extract variables", "prompt variables to notion", "update variables", "document variables", or provides a path to prompt files. Handles single files or directories. Creates/updates Notion database with variable metadata (name, description, data type, node).
npx skillsauth add beam-ai-team/beam-next-skills update-variables-in-notionInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Extract {VARIABLE_NAME} patterns from Beam prompt chain files and sync to a Notion database for documentation and tracking.
Trigger this skill when:
Run the extraction script on the provided path (single file or directory):
python3 scripts/extract_variables.py <path_to_file_or_directory>
Output: JSON with extracted variables including:
name: Variable name (e.g., "RESUME_TEXT_PLACEHOLDER")node: Filename without extension (e.g., "1-extract-resume-data")data_type: Inferred type (string/number/boolean/array/object)context: Surrounding text (200 chars)line_number: Where variable appears in fileReview the output and note:
Ask user: "Should I create a new Notion database or update an existing one?"
Option A - New Database:
Option B - Existing Database:
mcp__notion__notion-fetchFetch and analyze existing database:
Use mcp__notion__notion-fetch to get database structure
Parse schema to identify:
Display schema to user:
Found existing database schema:
- Title property: "Name" (title)
- "Description" (rich_text)
- "Type" (select: string, number, boolean, array, object)
- "Possible Values" (rich_text)
- "Status" (select: to add, to confirm, done)
- "Node Name" (rich_text)
Ask for field mapping:
Let me map the extracted data to your database fields:
Extracted fields → Database properties:
- Variable name → "Name" (title) ✓
- Data type → "Type" (select) ✓
- Possible values → "Possible Values" (rich_text) ✓
- Node name → "Node Name" (rich_text) ✓
- Status → "Status" (select, default: "to add") ✓
- Description → (leave empty for user to fill) ✓
Does this mapping look correct?
- "yes" - Continue with this mapping
- "no" - I'll ask about each field individually
If user says "no", ask for each mapping:
Where should I put the variable name?
Available fields: [list title properties]
Where should I put the data type?
Available fields: [list select/rich_text properties]
Where should I put the node name?
Available fields: [list text properties]
Store mapping for use in Step 4
For new database:
Use mcp__notion__notion-create-database with properties:
{
"properties": {
"Name": {"title": {}},
"Description": {"rich_text": {}},
"Data Type": {
"select": {
"options": [
{"name": "string", "color": "blue"},
{"name": "number", "color": "green"},
{"name": "boolean", "color": "purple"},
{"name": "array", "color": "orange"},
{"name": "object", "color": "red"}
]
}
},
"Possible Values": {"rich_text": {}},
"Status": {
"select": {
"options": [
{"name": "to add", "color": "gray"},
{"name": "to confirm", "color": "yellow"},
{"name": "done", "color": "green"}
]
}
},
"Node": {"rich_text": {}}
}
}
For existing database:
Fetch database schema using mcp__notion__notion-fetch
Check for required fields:
mcp__notion__notion-update-databaseFetch all existing entries using mcp__notion__notion-search with database URL
Build list of existing variable names (from title property)
Compare with extracted variables:
Checking for duplicates...
Found in database: RESUME_TEXT_PLACEHOLDER, JOB_DATA_OBJECT
New variables: CANDIDATE_JSON_PLACEHOLDER, SMS_TEMPLATE_TEXT
Duplicates: 2 variables already exist
New: 2 variables to add
Ask user how to handle duplicates:
How should I handle variables that already exist?
Options:
- "skip" - Skip all duplicates (default, safe)
- "update" - Update existing entries (overwrites Data Type, Possible Values, and Node)
- "ask" - Ask me for each duplicate individually
Process based on user choice:
mcp__notion__notion-update-page for duplicatesPreserve existing content:
Use field mapping from Step 2.5 (or default if new database).
For new variables (not in database yet):
Use mcp__notion__notion-create-pages with mapped properties:
{
"parent": {"database_id": "<database_id>"},
"pages": [{
"properties": {
"<mapped_title_property>": "<variable_name>",
"<mapped_description_property>": "",
"<mapped_datatype_property>": "<inferred_type>",
"<mapped_possible_values_property>": "<extracted_possible_values>",
"<mapped_status_property>": "to add",
"<mapped_node_property>": "<node_name>"
}
}]
}
For duplicate variables (if user chose "update"):
Use mcp__notion__notion-update-page to update ONLY Data Type, Possible Values, and Node:
{
"page_id": "<existing_page_id>",
"properties": {
"<mapped_datatype_property>": "<inferred_type>",
"<mapped_possible_values_property>": "<extracted_possible_values>",
"<mapped_node_property>": "<node_name>"
// DO NOT include Description or Status - preserve user content
}
}
Batch creation: Group new variables into batches of 10-20 for efficient creation.
Field handling:
Description extraction notes:
Report comprehensive results:
✅ Variables synced to Notion!
Summary:
- Total variables extracted: [N]
- New entries created: [X]
- Existing entries updated: [Y] (if update mode)
- Duplicates skipped: [Z] (if skip mode)
- Enum fields with possible values: [E]
Database: [Notion database URL]
Field mapping used:
- Variable names → [property name]
- Data types → [property name]
- Possible values → [property name] (auto-extracted from schema)
- Status → [property name] (default: "to add")
- Node names → [property name]
- Descriptions → (user-fillable)
Next steps:
- Review the database and add descriptions for new variables
- Verify data types and possible values are correct
- Update Status field as you document each variable
- Update any fields that need correction
Remind user: Descriptions are intentionally left empty for you to fill with context-specific information.
The script infers data types using naming patterns and context. See data-type-inference.md for detailed rules.
Quick reference:
{USER_COUNT}, {JOB_ID} → number{HAS_LICENSE}, {IS_QUALIFIED} → boolean{CANDIDATE_LIST}, {ITEMS_ARRAY} → array{CONFIG_JSON}, {USER_OBJECT} → objectNo variables found:
{VARIABLE_NAME} format (uppercase with underscores)Notion database errors:
Duplicate handling:
Single file:
User: "Extract variables from 02-projects/agent-1/prompts/extract-data.md and update in Notion"
tools
Build a Palantir-shape, PDF-native use-case proposal document for a sophisticated enterprise account: research-grounded use cases (each with description, challenge, impact, value), an operating-graph ontology page, a recommended PoC with a week-by-week plan, and a closing page that asks for one decision. Load when a client asks us to 'propose high-impact use cases', requests a use-case presentation/catalog for a function (finance, HR, ops), or when a technical evaluation team will review candidates to pick a PoC. NOT for single-account cold outreach (use prospect-brief), full process diagnostics (use operating-diagnostic), or priced proposals (use proposal-creation).
development
Convert Beam Figma slide designs into high-fidelity, editable HTML presentation decks. Use when Codex is asked to audit Figma slides, extract slide templates, rebuild Beam slides as HTML decks, decide whether Figma imagery should be exported or rebuilt in HTML/CSS, create Beam/Prism-compatible deck templates, or improve fidelity of existing Beam HTML slide rebuilds.
development
Use the Beam AI reusable slide library: individual HTML slide templates extracted from Beam Figma rebuilds, kept separate from deck themes and full deck templates. Load when the user asks for a slide library, specific Beam slide patterns, reusable Figma-inspired slides, Prism slide-library items, or slide-level HTML templates.
development
Use Beam AI deck and report design packs, HTML templates, and curated examples to create sales decks, customer intro decks, RPO decks, and DIN A4 use-case proposal reports. Load when the user asks for Beam-branded presentation templates, Prism-compatible deck templates, Beam report templates, customer intro decks, commercial proposals, or reusable HTML deck/report examples.