Add URL processing workflow and update permissions

Introduced detailed URL processing workflow and Vietnamese writing guidelines to CLAUDE.md for newsletter automation. Updated settings.local.json to allow general WebFetch and Bash(mkdir:*) permissions, replacing specific domain-based permissions.
This commit is contained in:
2025-07-22 21:00:02 +07:00
parent 5bc240dac3
commit 26db6b350e
2 changed files with 69 additions and 7 deletions
+3 -7
View File
@@ -1,13 +1,9 @@
{
"permissions": {
"allow": [
"WebFetch(domain:www.anthropic.com)",
"WebFetch(domain:www.subtle.so)",
"WebFetch(domain:addyo.substack.com)",
"WebFetch(domain:skiplabs.io)",
"WebFetch(domain:www.16elt.com)",
"WebFetch(domain:meowbark.dev)"
"WebFetch",
"Bash(mkdir:*)"
],
"deny": []
}
}
}
+66
View File
@@ -66,6 +66,72 @@ The repository includes a Cursor rule for automated newsletter processing locate
When working with newsletter content, follow the established pattern and ensure compliance with the processing rules.
## URL Processing Workflow
When a URL is provided, Claude should automatically process it according to these rules:
### URL Processing Steps
1. **Clean URL**: Remove tracking parameters (utm_source, ref, etc.)
2. **Verify accessibility**: Check if URL is reachable
3. **Extract content**: Get original article title and content
4. **Check duplicates**: Ensure article hasn't been covered in existing newsletters
5. **Date handling**: Use current date in YYYY-MM-DD format
### Newsletter Creation/Update Logic
- **Check existing**: Look for newsletter file for current date in `content/post/YYYY/MM/DD/index.md`
- **If exists**: Append new article section before any bonus content
- **If new**: Create new newsletter with auto-incremented number
- **Directory structure**: Create YYYY/MM/DD structure if needed
### Content Structure for URL Processing
```markdown
---
title: "Newsletter #[number]"
date: [current date YYYY-MM-DD]
tags: [ "AI-Assisted", [additional relevant tags] ]
categories: [ "Newsletter" ]
---
*Mời bạn thưởng thức Newsletter #[number].*
## [Original Article Title](clean_url)
[Vietnamese summary in professional tone - 2-4 paragraphs]
[Optional bullet points for key takeaways]
```
### Quality Standards for URL Processing
- Write Vietnamese summaries in professional tone
- **Language Guidelines**: Use Vietnamese as primary language, only keep essential technical terms in English (like API, framework names, specific technologies). Avoid overusing English terms that have good Vietnamese equivalents
- **Target Audience**: Write for junior developers - use accessible language and explain complex concepts clearly
- **Technical Term Usage**: Prefer Vietnamese equivalents when they exist and are commonly understood (e.g., "bộ thu gom rác" instead of "garbage collector", "tái cấu trúc" instead of "refactoring", "mùi mã" instead of "code smells")
- Include "AI-Assisted" tag and "Newsletter" category
- Maximum 5 tags per newsletter
- Maintain consistent formatting and structure
- Verify all links work properly
### Vietnamese Writing Guidelines
- **Primary principle**: Write in Vietnamese first, use English technical terms only when necessary
- **Common replacements**:
- "framework" → "khung làm việc" (when context allows)
- "refactoring" → "tái cấu trúc mã"
- "code smells" → "mùi mã"
- "error messages" → "thông báo lỗi"
- "big tech companies" → "các công ty công nghệ lớn"
- "engineers" → "kỹ sư" or "lập trình viên"
- "workload" → "ứng dụng" or "tải công việc"
- "migration" → "di chuyển"
- "embedding models" → "mô hình nhúng"
- **Keep English for**: Specific technology names (React, Java, ZGC), widely-used acronyms (API, REST, HTTP), code examples and commands
- **Tone**: Professional but accessible, suitable for junior developers learning new concepts
### Error Handling
- Skip inaccessible URLs and notify
- Skip duplicate articles and notify
- Use fallback date methods if primary fails
- Create directory structure as needed
## File Organization
- `content/` - All markdown content and assets