feat(linkedin): integrate state-updater.mjs across all commands and hooks
Replace manual YAML editing instructions with deterministic state-updater.mjs calls in 8 content commands (post, quick, react, pipeline, first-post, video, publish, carousel) and 2 hook prompts (state-update-reminder, post-creation-automation). Batch.md gets note that state updates happen at publish time. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
aa5cca9cf6
commit
1474948ef8
11 changed files with 141 additions and 72 deletions
|
|
@ -202,12 +202,20 @@ Before you record:
|
|||
```
|
||||
|
||||
**State Update:**
|
||||
After the script is finalized, update `~/.claude/linkedin-thought-leadership.local.md`:
|
||||
- Set `last_post_date` to today's date
|
||||
- Check if ISO week changed — if so, reset `posts_this_week` to 0, update `current_week`
|
||||
- Increment `posts_this_week`
|
||||
- Update streak: increment if consecutive day, reset to 1 if gap > 2 days
|
||||
- Add to "Recent Posts": `[YYYY-MM-DD] "Hook text..." [VIDEO/type/length] - topic`
|
||||
After the script is finalized, update state deterministically:
|
||||
```bash
|
||||
node --input-type=module -e "
|
||||
import { writeState, updatePostTracking } from '${CLAUDE_PLUGIN_ROOT}/hooks/scripts/state-updater.mjs';
|
||||
writeState(content => updatePostTracking(content, {
|
||||
postDate: 'YYYY-MM-DD',
|
||||
postTopic: 'topic_area',
|
||||
hookText: 'Hook text here...',
|
||||
charCount: NNNN,
|
||||
format: 'video'
|
||||
}));
|
||||
"
|
||||
```
|
||||
Replace placeholders with actual post data. This replaces manual YAML editing.
|
||||
|
||||
## Reference Files
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue