Skip to content

Commit dc18f49

Browse files
committed
claude(drafting-til): update based on notion posting errors it encountered
1 parent aacdee6 commit dc18f49

File tree

1 file changed

+57
-26
lines changed
  • tools/claude/config/skills/drafting-til

1 file changed

+57
-26
lines changed

tools/claude/config/skills/drafting-til/SKILL.md

Lines changed: 57 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -105,12 +105,19 @@ Every technique below serves these principles.
105105

106106
---
107107

108-
## Notion Property Mappings
108+
## Notion Databases
109109

110-
**Database**: Writing
110+
### Writing Database
111111
**Data Source ID**: `c296db5b-d2f1-44d4-abc6-f9a05736b143`
112112

113-
When creating a TIL page, set these properties:
113+
### TIL Assessed Commits Database
114+
**Data Source ID**: `cba80148-aeef-49c9-ba45-5157668b17b3`
115+
116+
---
117+
118+
## Property Mappings
119+
120+
When creating a TIL page in the Writing database, set these properties:
114121

115122
| Property | Value |
116123
|----------|-------|
@@ -133,34 +140,56 @@ When creating a TIL page, set these properties:
133140
3. **Write content** - Follow voice guide above
134141
4. **Generate slug** - Lowercase title with hyphens, no special chars
135142
5. **Write description** - One sentence summarizing the takeaway
136-
6. **Publish via script** - Pass JSON to `publish_til.py`:
143+
6. **Publish via Notion MCP** - Two-step process:
137144

138-
```bash
139-
echo '<json>' | python3 ~/.claude/skills/scanning-git-for-tils/publish_til.py
145+
### Step 1: Create Writing Page
146+
147+
Use `mcp__notion__notion-create-pages` with Writing data source:
148+
149+
```javascript
150+
{
151+
"parent": {"data_source_id": "c296db5b-d2f1-44d4-abc6-f9a05736b143"},
152+
"pages": [{
153+
"properties": {
154+
"Title": "Your TIL Title Here",
155+
"Status": "Claude Draft",
156+
"Type": "how-to",
157+
"Destination": "blog",
158+
"Description": "One-line summary here",
159+
"Slug": "your-til-title-here"
160+
},
161+
"content": "Your markdown content here..."
162+
}]
163+
}
140164
```
141165

142-
**Input JSON:**
143-
```json
166+
**Capture the Writing page URL from the response** - you'll need it for step 2.
167+
168+
### Step 2: Create Tracker Entry
169+
170+
Use `mcp__notion__notion-create-pages` with TIL Assessed Commits data source:
171+
172+
```javascript
144173
{
145-
"title": "Your TIL Title Here",
146-
"content": "Your markdown content here",
147-
"slug": "your-til-title-here",
148-
"description": "One-line summary here",
149-
"commit": {
150-
"hash": "full-sha-hash",
151-
"message": "original commit message",
152-
"repo": "owner/repo",
153-
"date": "2025-01-15"
154-
}
174+
"parent": {"data_source_id": "cba80148-aeef-49c9-ba45-5157668b17b3"},
175+
"pages": [{
176+
"properties": {
177+
"Commit Hash": "full-sha-hash",
178+
"Message": "original commit message",
179+
"Repo": "owner/repo",
180+
"date:Commit Date:start": "2025-01-15",
181+
"date:Commit Date:is_datetime": 0,
182+
"date:Assessed:start": "2025-01-22",
183+
"date:Assessed:is_datetime": 0,
184+
"Writing": "[\"https://www.notion.so/writing-page-url\"]"
185+
}
186+
}]
155187
}
156188
```
157189

158-
**Output:** URLs for Writing page and tracker entry
190+
**Important**: The `Writing` property must be a JSON array of URLs as a string: `"[\"url\"]"`
159191

160-
The script automatically:
161-
- Creates the Writing page with Status="Claude Draft"
162-
- Creates the TIL Assessed Commits entry
163-
- Links them via the Writing relation
192+
Both operations return URLs - display both to the user.
164193

165194
---
166195

@@ -259,10 +288,12 @@ The `filter(Boolean)` step passes each item to `Boolean()`, which coerces it to
259288

260289
## After Creation
261290

262-
After the script completes successfully:
291+
After both MCP operations complete successfully:
263292

264-
1. Display the Writing page URL from the script output
293+
1. Display both URLs:
294+
- Writing page URL (for reviewing/editing the draft)
295+
- Tracker page URL (confirms commit was marked as assessed)
265296
2. Remind user they can review and edit in Notion
266297
3. Offer to draft another or return to suggestions
267298

268-
The script handles all Notion operations including linking the tracker entry to the draft.
299+
The tracker entry is automatically linked to the Writing page via the relation property.

0 commit comments

Comments
 (0)