v1.1.0: Skills integration, cross-platform support, bug fixes

This commit is contained in:
admin
2026-02-26 02:34:00 +04:00
Unverified
parent c9799c1eac
commit 2f49d51abd
10 changed files with 1709 additions and 58 deletions

View File

@@ -452,6 +452,57 @@ rm -rf QwenClaw-with-Auth
---
## Versioning & Changelog
QwenClaw follows [Semantic Versioning](https://semver.org/) (MAJOR.MINOR.PATCH).
### [1.1.0] - 2026-02-26
#### Added
- **Skills Integration**: Imported 25+ skills from [awesome-claude-skills](https://github.com/ComposioHQ/awesome-claude-skills)
- Content Research Writer
- File Organizer
- Developer Growth Analysis
- Changelog Generator
- Document Skills
- Image Enhancer
- Video Downloader
- And 19 more...
- **Cross-platform support**: Full compatibility for Windows, Linux, and macOS
- **Skills index**: `skills/skills-index.json` for skill discovery
- **Installation scripts**: `install.sh` (Linux/macOS) and `install.ps1` (Windows)
#### Fixed
- Daemon startup issue on Windows (qwen.cmd path resolution)
- Settings file path (`.qwen/qwenclaw/settings.json`)
- Statusline command path (`.qwen/statusline.cjs`)
- Async/await handling in main entry point
- Shell execution for cross-platform command spawning
#### Changed
- Removed debug logging from production code
- Improved error handling and reporting
- Updated README with comprehensive documentation
- Added versioning and changelog section
### [1.0.0] - 2026-02-26
#### Added
- Initial release
- Daemon with auto-start capability
- Heartbeat system with quiet hours
- Cron job scheduling
- Telegram bot integration
- Web dashboard (http://127.0.0.1:4632)
- Four security levels (locked, strict, moderate, unrestricted)
- Session persistence
- Hot-reload configuration
- Windows Task Scheduler integration
- Linux systemd service support
- macOS LaunchAgent support
---
## License
MIT License - See [LICENSE](LICENSE) file for details.

79
skills/README.md Normal file
View File

@@ -0,0 +1,79 @@
# QwenClaw Skills
Skills are specialized capabilities that enhance QwenClaw's ability to help with specific tasks. These skills are adapted from the [awesome-claude-skills](https://github.com/ComposioHQ/awesome-claude-skills) repository.
## Available Skills
### Document Processing
- **Document Skills** - Process, analyze, and extract information from documents
- **File Organizer** - Organize and structure files systematically
### Development & Code Tools
- **Developer Growth Analysis** - Analyze and improve development practices
- **Web App Testing** - Test and validate web applications
- **MCP Builder** - Build Model Context Protocol integrations
### Content & Research
- **Content Research Writer** - Research, write, and cite high-quality content
- **Competitive Ads Extractor** - Analyze competitor advertising strategies
- **Lead Research Assistant** - Research and qualify leads
### Business & Productivity
- **Internal Comms** - Improve internal communications
- **Meeting Insights Analyzer** - Extract insights from meeting notes
- **Invoice Organizer** - Organize and categorize invoices
### Creative & Media
- **Image Enhancer** - Enhance and optimize images
- **Video Downloader** - Download and process video content
- **Theme Factory** - Generate themes and design concepts
- **Canvas Design** - Create canvas designs and layouts
### Writing & Communication
- **Tailored Resume Generator** - Create customized resumes
- **Changelog Generator** - Generate project changelogs
- **Brand Guidelines** - Maintain and apply brand guidelines
- **Twitter Algorithm Optimizer** - Optimize social media content
### Tools & Utilities
- **Domain Name Brainstormer** - Generate domain name ideas
- **Raffle Winner Picker** - Select random winners fairly
- **Slack GIF Creator** - Create GIFs for Slack
- **LangSmith Fetch** - Fetch and analyze LangSmith data
### Composio Integrations
- **Connect Apps** - Connect to 500+ apps via Composio
- **Composio Skills** - Access Composio-powered capabilities
## Using Skills
Skills are automatically available when you run QwenClaw. To use a specific skill:
```bash
# Start QwenClaw with a skill-focused prompt
bun run start --prompt "Use the content-research-writer skill to help me write an article about AI"
```
Or send to a running daemon:
```bash
bun run send "Use the file-organizer skill to organize my downloads folder"
```
## Skill Structure
Each skill consists of:
- **SKILL.md** - Skill definition and instructions
- **prompts/** - Pre-built prompts for the skill
- **examples/** - Usage examples
## Creating Custom Skills
1. Create a new directory in `skills/`
2. Add `SKILL.md` with skill definition
3. Add any supporting files (prompts, examples)
4. Update `skills-index.json`
## Skills Index
See `skills-index.json` for the complete list of available skills and their locations.

View File

@@ -0,0 +1,104 @@
---
name: changelog-generator
description: Automatically creates user-facing changelogs from git commits by analyzing commit history, categorizing changes, and transforming technical commits into clear, customer-friendly release notes. Turns hours of manual changelog writing into minutes of automated generation.
---
# Changelog Generator
This skill transforms technical git commits into polished, user-friendly changelogs that your customers and users will actually understand and appreciate.
## When to Use This Skill
- Preparing release notes for a new version
- Creating weekly or monthly product update summaries
- Documenting changes for customers
- Writing changelog entries for app store submissions
- Generating update notifications
- Creating internal release documentation
- Maintaining a public changelog/product updates page
## What This Skill Does
1. **Scans Git History**: Analyzes commits from a specific time period or between versions
2. **Categorizes Changes**: Groups commits into logical categories (features, improvements, bug fixes, breaking changes, security)
3. **Translates Technical → User-Friendly**: Converts developer commits into customer language
4. **Formats Professionally**: Creates clean, structured changelog entries
5. **Filters Noise**: Excludes internal commits (refactoring, tests, etc.)
6. **Follows Best Practices**: Applies changelog guidelines and your brand voice
## How to Use
### Basic Usage
From your project repository:
```
Create a changelog from commits since last release
```
```
Generate changelog for all commits from the past week
```
```
Create release notes for version 2.5.0
```
### With Specific Date Range
```
Create a changelog for all commits between March 1 and March 15
```
### With Custom Guidelines
```
Create a changelog for commits since v2.4.0, using my changelog
guidelines from CHANGELOG_STYLE.md
```
## Example
**User**: "Create a changelog for commits from the past 7 days"
**Output**:
```markdown
# Updates - Week of March 10, 2024
## ✨ New Features
- **Team Workspaces**: Create separate workspaces for different
projects. Invite team members and keep everything organized.
- **Keyboard Shortcuts**: Press ? to see all available shortcuts.
Navigate faster without touching your mouse.
## 🔧 Improvements
- **Faster Sync**: Files now sync 2x faster across devices
- **Better Search**: Search now includes file contents, not just titles
## 🐛 Fixes
- Fixed issue where large images wouldn't upload
- Resolved timezone confusion in scheduled posts
- Corrected notification badge count
```
**Inspired by:** Manik Aggarwal's use case from Lenny's Newsletter
## Tips
- Run from your git repository root
- Specify date ranges for focused changelogs
- Use your CHANGELOG_STYLE.md for consistent formatting
- Review and adjust the generated changelog before publishing
- Save output directly to CHANGELOG.md
## Related Use Cases
- Creating GitHub release notes
- Writing app store update descriptions
- Generating email updates for users
- Creating social media announcement posts

View File

@@ -0,0 +1,538 @@
---
name: content-research-writer
description: Assists in writing high-quality content by conducting research, adding citations, improving hooks, iterating on outlines, and providing real-time feedback on each section. Transforms your writing process from solo effort to collaborative partnership.
---
# Content Research Writer
This skill acts as your writing partner, helping you research, outline, draft, and refine content while maintaining your unique voice and style.
## When to Use This Skill
- Writing blog posts, articles, or newsletters
- Creating educational content or tutorials
- Drafting thought leadership pieces
- Researching and writing case studies
- Producing technical documentation with sources
- Writing with proper citations and references
- Improving hooks and introductions
- Getting section-by-section feedback while writing
## What This Skill Does
1. **Collaborative Outlining**: Helps you structure ideas into coherent outlines
2. **Research Assistance**: Finds relevant information and adds citations
3. **Hook Improvement**: Strengthens your opening to capture attention
4. **Section Feedback**: Reviews each section as you write
5. **Voice Preservation**: Maintains your writing style and tone
6. **Citation Management**: Adds and formats references properly
7. **Iterative Refinement**: Helps you improve through multiple drafts
## How to Use
### Setup Your Writing Environment
Create a dedicated folder for your article:
```
mkdir ~/writing/my-article-title
cd ~/writing/my-article-title
```
Create your draft file:
```
touch article-draft.md
```
Open Claude Code from this directory and start writing.
### Basic Workflow
1. **Start with an outline**:
```
Help me create an outline for an article about [topic]
```
2. **Research and add citations**:
```
Research [specific topic] and add citations to my outline
```
3. **Improve the hook**:
```
Here's my introduction. Help me make the hook more compelling.
```
4. **Get section feedback**:
```
I just finished the "Why This Matters" section. Review it and give feedback.
```
5. **Refine and polish**:
```
Review the full draft for flow, clarity, and consistency.
```
## Instructions
When a user requests writing assistance:
1. **Understand the Writing Project**
Ask clarifying questions:
- What's the topic and main argument?
- Who's the target audience?
- What's the desired length/format?
- What's your goal? (educate, persuade, entertain, explain)
- Any existing research or sources to include?
- What's your writing style? (formal, conversational, technical)
2. **Collaborative Outlining**
Help structure the content:
```markdown
# Article Outline: [Title]
## Hook
- [Opening line/story/statistic]
- [Why reader should care]
## Introduction
- Context and background
- Problem statement
- What this article covers
## Main Sections
### Section 1: [Title]
- Key point A
- Key point B
- Example/evidence
- [Research needed: specific topic]
### Section 2: [Title]
- Key point C
- Key point D
- Data/citation needed
### Section 3: [Title]
- Key point E
- Counter-arguments
- Resolution
## Conclusion
- Summary of main points
- Call to action
- Final thought
## Research To-Do
- [ ] Find data on [topic]
- [ ] Get examples of [concept]
- [ ] Source citation for [claim]
```
**Iterate on outline**:
- Adjust based on feedback
- Ensure logical flow
- Identify research gaps
- Mark sections for deep dives
3. **Conduct Research**
When user requests research on a topic:
- Search for relevant information
- Find credible sources
- Extract key facts, quotes, and data
- Add citations in requested format
Example output:
```markdown
## Research: AI Impact on Productivity
Key Findings:
1. **Productivity Gains**: Studies show 40% time savings for
content creation tasks [1]
2. **Adoption Rates**: 67% of knowledge workers use AI tools
weekly [2]
3. **Expert Quote**: "AI augments rather than replaces human
creativity" - Dr. Jane Smith, MIT [3]
Citations:
[1] McKinsey Global Institute. (2024). "The Economic Potential
of Generative AI"
[2] Stack Overflow Developer Survey (2024)
[3] Smith, J. (2024). MIT Technology Review interview
Added to outline under Section 2.
```
4. **Improve Hooks**
When user shares an introduction, analyze and strengthen:
**Current Hook Analysis**:
- What works: [positive elements]
- What could be stronger: [areas for improvement]
- Emotional impact: [current vs. potential]
**Suggested Alternatives**:
Option 1: [Bold statement]
> [Example]
*Why it works: [explanation]*
Option 2: [Personal story]
> [Example]
*Why it works: [explanation]*
Option 3: [Surprising data]
> [Example]
*Why it works: [explanation]*
**Questions to hook**:
- Does it create curiosity?
- Does it promise value?
- Is it specific enough?
- Does it match the audience?
5. **Provide Section-by-Section Feedback**
As user writes each section, review for:
```markdown
# Feedback: [Section Name]
## What Works Well ✓
- [Strength 1]
- [Strength 2]
- [Strength 3]
## Suggestions for Improvement
### Clarity
- [Specific issue] → [Suggested fix]
- [Complex sentence] → [Simpler alternative]
### Flow
- [Transition issue] → [Better connection]
- [Paragraph order] → [Suggested reordering]
### Evidence
- [Claim needing support] → [Add citation or example]
- [Generic statement] → [Make more specific]
### Style
- [Tone inconsistency] → [Match your voice better]
- [Word choice] → [Stronger alternative]
## Specific Line Edits
Original:
> [Exact quote from draft]
Suggested:
> [Improved version]
Why: [Explanation]
## Questions to Consider
- [Thought-provoking question 1]
- [Thought-provoking question 2]
Ready to move to next section!
```
6. **Preserve Writer's Voice**
Important principles:
- **Learn their style**: Read existing writing samples
- **Suggest, don't replace**: Offer options, not directives
- **Match tone**: Formal, casual, technical, friendly
- **Respect choices**: If they prefer their version, support it
- **Enhance, don't override**: Make their writing better, not different
Ask periodically:
- "Does this sound like you?"
- "Is this the right tone?"
- "Should I be more/less [formal/casual/technical]?"
7. **Citation Management**
Handle references based on user preference:
**Inline Citations**:
```markdown
Studies show 40% productivity improvement (McKinsey, 2024).
```
**Numbered References**:
```markdown
Studies show 40% productivity improvement [1].
[1] McKinsey Global Institute. (2024)...
```
**Footnote Style**:
```markdown
Studies show 40% productivity improvement^1
^1: McKinsey Global Institute. (2024)...
```
Maintain a running citations list:
```markdown
## References
1. Author. (Year). "Title". Publication.
2. Author. (Year). "Title". Publication.
...
```
8. **Final Review and Polish**
When draft is complete, provide comprehensive feedback:
```markdown
# Full Draft Review
## Overall Assessment
**Strengths**:
- [Major strength 1]
- [Major strength 2]
- [Major strength 3]
**Impact**: [Overall effectiveness assessment]
## Structure & Flow
- [Comments on organization]
- [Transition quality]
- [Pacing assessment]
## Content Quality
- [Argument strength]
- [Evidence sufficiency]
- [Example effectiveness]
## Technical Quality
- Grammar and mechanics: [assessment]
- Consistency: [assessment]
- Citations: [completeness check]
## Readability
- Clarity score: [evaluation]
- Sentence variety: [evaluation]
- Paragraph length: [evaluation]
## Final Polish Suggestions
1. **Introduction**: [Specific improvements]
2. **Body**: [Specific improvements]
3. **Conclusion**: [Specific improvements]
4. **Title**: [Options if needed]
## Pre-Publish Checklist
- [ ] All claims sourced
- [ ] Citations formatted
- [ ] Examples clear
- [ ] Transitions smooth
- [ ] Call to action present
- [ ] Proofread for typos
Ready to publish! 🚀
```
## Examples
### Example 1: Teresa Torres's Workflow
**User**: "I'm writing an article about continuous discovery. Help me create an outline."
**Process**:
1. Collaborates on outline structure
2. Identifies research needs
3. User starts writing introduction
4. Reviews and improves the hook
5. User writes each section
6. Provides feedback after each section
7. Conducts research and adds citations
8. Final review of complete draft
9. Polish and prep for publishing
**Result**: Well-researched, properly cited article written in Teresa's voice with strong structure and flow.
### Example 2: Research-Heavy Article
**User**: "I'm writing about AI's impact on product management. Help me find current data and examples."
**Output**:
```markdown
## Research Compiled
### Recent Data
- Gartner: 80% of PMs will use AI tools by 2025 [1]
- Survey: 45% report faster feature shipping [2]
- Case study: Airbnb's AI-assisted prioritization [3]
### Expert Quotes
- "AI amplifies PM judgment, not replaces it" - Marty Cagan
- [Additional quotes with citations]
### Real Examples
1. **Company A**: Used AI for user research synthesis
- Result: 60% time savings
- Source: [citation]
2. **Company B**: AI-powered roadmap analysis
- Result: Better stakeholder alignment
- Source: [citation]
All added to your outline with proper citations.
```
### Example 3: Hook Improvement
**User's Original Hook**:
> "Product management is changing because of AI. In this article, I'll discuss some ways AI affects product managers."
**Improved Options**:
**Option 1 (Data-driven)**:
> "Last month, I asked AI to analyze 500 customer interviews. It took 30 minutes instead of 3 weeks. Product management will never be the same."
**Option 2 (Question)**:
> "What if you could talk to every customer, read every review, and analyze every support ticket—all before your morning coffee?"
**Option 3 (Story)**:
> "Sarah spent two weeks building the wrong feature. Not because she didn't understand her users, but because she couldn't process the hundreds of interviews fast enough to spot the pattern."
### Example 4: Section Feedback
**User**: "Just finished my 'Common Mistakes' section. Thoughts?"
**Response**:
```markdown
# Feedback: Common Mistakes Section
## What Works Well ✓
- Strong examples (the Slack notification story)
- Clear structure (3 mistakes, clean layout)
- Practical advice for each mistake
## Suggestions
### Make It More Specific
Your second point says "Bad prioritization" but could be stronger:
Current:
> "Many teams prioritize badly by focusing on features instead of outcomes."
Suggested:
> "I've watched teams ship 14 features in a quarter yet move none of their key metrics. They prioritized activity over progress."
### Add Data
The third mistake would benefit from evidence:
> "[Add citation]: Studies show teams without regular user contact are 3x more likely to build unused features [needs source]"
### Flow Improvement
Consider reordering: Mistake 3 → Mistake 2 → Mistake 1
This builds from small to big impact.
Ready for the next section!
```
## Writing Workflows
### Blog Post Workflow
1. Outline together
2. Research key points
3. Write introduction → get feedback
4. Write body sections → feedback each
5. Write conclusion → final review
6. Polish and edit
### Newsletter Workflow
1. Discuss hook ideas
2. Quick outline (shorter format)
3. Draft in one session
4. Review for clarity and links
5. Quick polish
### Technical Tutorial Workflow
1. Outline steps
2. Write code examples
3. Add explanations
4. Test instructions
5. Add troubleshooting section
6. Final review for accuracy
### Thought Leadership Workflow
1. Brainstorm unique angle
2. Research existing perspectives
3. Develop your thesis
4. Write with strong POV
5. Add supporting evidence
6. Craft compelling conclusion
## Pro Tips
1. **Work in VS Code**: Better than web Claude for long-form writing
2. **One section at a time**: Get feedback incrementally
3. **Save research separately**: Keep a research.md file
4. **Version your drafts**: article-v1.md, article-v2.md, etc.
5. **Read aloud**: Use feedback to identify clunky sentences
6. **Set deadlines**: "I want to finish the draft today"
7. **Take breaks**: Write, get feedback, pause, revise
## File Organization
Recommended structure for writing projects:
```
~/writing/article-name/
├── outline.md # Your outline
├── research.md # All research and citations
├── draft-v1.md # First draft
├── draft-v2.md # Revised draft
├── final.md # Publication-ready
├── feedback.md # Collected feedback
└── sources/ # Reference materials
├── study1.pdf
└── article2.md
```
## Best Practices
### For Research
- Verify sources before citing
- Use recent data when possible
- Balance different perspectives
- Link to original sources
### For Feedback
- Be specific about what you want: "Is this too technical?"
- Share your concerns: "I'm worried this section drags"
- Ask questions: "Does this flow logically?"
- Request alternatives: "What's another way to explain this?"
### For Voice
- Share examples of your writing
- Specify tone preferences
- Point out good matches: "That sounds like me!"
- Flag mismatches: "Too formal for my style"
## Related Use Cases
- Creating social media posts from articles
- Adapting content for different audiences
- Writing email newsletters
- Drafting technical documentation
- Creating presentation content
- Writing case studies
- Developing course outlines

View File

@@ -0,0 +1,322 @@
---
name: developer-growth-analysis
description: Analyzes your recent Claude Code chat history to identify coding patterns, development gaps, and areas for improvement, curates relevant learning resources from HackerNews, and automatically sends a personalized growth report to your Slack DMs.
---
# Developer Growth Analysis
This skill provides personalized feedback on your recent coding work by analyzing your Claude Code chat interactions and identifying patterns that reveal strengths and areas for growth.
## When to Use This Skill
Use this skill when you want to:
- Understand your development patterns and habits from recent work
- Identify specific technical gaps or recurring challenges
- Discover which topics would benefit from deeper study
- Get curated learning resources tailored to your actual work patterns
- Track improvement areas across your recent projects
- Find high-quality articles that directly address the skills you're developing
This skill is ideal for developers who want structured feedback on their growth without waiting for code reviews, and who prefer data-driven insights from their own work history.
## What This Skill Does
This skill performs a six-step analysis of your development work:
1. **Reads Your Chat History**: Accesses your local Claude Code chat history from the past 24-48 hours to understand what you've been working on.
2. **Identifies Development Patterns**: Analyzes the types of problems you're solving, technologies you're using, challenges you encounter, and how you approach different kinds of tasks.
3. **Detects Improvement Areas**: Recognizes patterns that suggest skill gaps, repeated struggles, inefficient approaches, or areas where you might benefit from deeper knowledge.
4. **Generates a Personalized Report**: Creates a comprehensive report showing your work summary, identified improvement areas, and specific recommendations for growth.
5. **Finds Learning Resources**: Uses HackerNews to curate high-quality articles and discussions directly relevant to your improvement areas, providing you with a reading list tailored to your actual development work.
6. **Sends to Your Slack DMs**: Automatically delivers the complete report to your own Slack direct messages so you can reference it anytime, anywhere.
## How to Use
Ask Claude to analyze your recent coding work:
```
Analyze my developer growth from my recent chats
```
Or be more specific about which time period:
```
Analyze my work from today and suggest areas for improvement
```
The skill will generate a formatted report with:
- Overview of your recent work
- Key improvement areas identified
- Specific recommendations for each area
- Curated learning resources from HackerNews
- Action items you can focus on
## Instructions
When a user requests analysis of their developer growth or coding patterns from recent work:
1. **Access Chat History**
Read the chat history from `~/.claude/history.jsonl`. This file is a JSONL format where each line contains:
- `display`: The user's message/request
- `project`: The project being worked on
- `timestamp`: Unix timestamp (in milliseconds)
- `pastedContents`: Any code or content pasted
Filter for entries from the past 24-48 hours based on the current timestamp.
2. **Analyze Work Patterns**
Extract and analyze the following from the filtered chats:
- **Projects and Domains**: What types of projects was the user working on? (e.g., backend, frontend, DevOps, data, etc.)
- **Technologies Used**: What languages, frameworks, and tools appear in the conversations?
- **Problem Types**: What categories of problems are being solved? (e.g., performance optimization, debugging, feature implementation, refactoring, setup/configuration)
- **Challenges Encountered**: What problems did the user struggle with? Look for:
- Repeated questions about similar topics
- Problems that took multiple attempts to solve
- Questions indicating knowledge gaps
- Complex architectural decisions
- **Approach Patterns**: How does the user solve problems? (e.g., methodical, exploratory, experimental)
3. **Identify Improvement Areas**
Based on the analysis, identify 3-5 specific areas where the user could improve. These should be:
- **Specific** (not vague like "improve coding skills")
- **Evidence-based** (grounded in actual chat history)
- **Actionable** (practical improvements that can be made)
- **Prioritized** (most impactful first)
Examples of good improvement areas:
- "Advanced TypeScript patterns (generics, utility types, type guards) - you struggled with type safety in [specific project]"
- "Error handling and validation - I noticed you patched several bugs related to missing null checks"
- "Async/await patterns - your recent work shows some race conditions and timing issues"
- "Database query optimization - you rewrote the same query multiple times"
4. **Generate Report**
Create a comprehensive report with this structure:
```markdown
# Your Developer Growth Report
**Report Period**: [Yesterday / Today / [Custom Date Range]]
**Last Updated**: [Current Date and Time]
## Work Summary
[2-3 paragraphs summarizing what the user worked on, projects touched, technologies used, and overall focus areas]
Example:
"Over the past 24 hours, you focused primarily on backend development with three distinct projects. Your work involved TypeScript, React, and deployment infrastructure. You tackled a mix of feature implementation, debugging, and architectural decisions, with a particular focus on API design and database optimization."
## Improvement Areas (Prioritized)
### 1. [Area Name]
**Why This Matters**: [Explanation of why this skill is important for the user's work]
**What I Observed**: [Specific evidence from chat history showing this gap]
**Recommendation**: [Concrete step(s) to improve in this area]
**Time to Skill Up**: [Brief estimate of effort required]
---
[Repeat for 2-4 additional areas]
## Strengths Observed
[2-3 bullet points highlighting things you're doing well - things to continue doing]
## Action Items
Priority order:
1. [Action item derived from highest priority improvement area]
2. [Action item from next area]
3. [Action item from next area]
## Learning Resources
[Will be populated in next step]
```
5. **Search for Learning Resources**
Use Rube MCP to search HackerNews for articles related to each improvement area:
- For each improvement area, construct a search query targeting high-quality resources
- Search HackerNews using RUBE_SEARCH_TOOLS with queries like:
- "Learn [Technology/Pattern] best practices"
- "[Technology] advanced patterns and techniques"
- "Debugging [specific problem type] in [language]"
- Prioritize posts with high engagement (comments, upvotes)
- For each area, include 2-3 most relevant articles with:
- Article title
- Publication date
- Brief description of why it's relevant
- Link to the article
Add this section to the report:
```markdown
## Curated Learning Resources
### For: [Improvement Area]
1. **[Article Title]** - [Date]
[Description of what it covers and why it's relevant to your improvement area]
[Link]
2. **[Article Title]** - [Date]
[Description]
[Link]
[Repeat for other improvement areas]
```
6. **Present the Complete Report**
Deliver the report in a clean, readable format that the user can:
- Quickly scan for key takeaways
- Use for focused learning planning
- Reference over the next week as they work on improvements
- Share with mentors if they want external feedback
7. **Send Report to Slack DMs**
Use Rube MCP to send the complete report to the user's own Slack DMs:
- Check if Slack connection is active via RUBE_SEARCH_TOOLS
- If not connected, use RUBE_MANAGE_CONNECTIONS to initiate Slack auth
- Use RUBE_MULTI_EXECUTE_TOOL to send the report as a formatted message:
- Send the report title and period as the first message
- Break the report into logical sections (Summary, Improvements, Strengths, Actions, Resources)
- Format each section as a well-structured Slack message with proper markdown
- Include clickable links for the learning resources
- Confirm delivery in the CLI output
This ensures the user has the report in a place they check regularly and can reference it throughout the week.
## Example Usage
### Input
```
Analyze my developer growth from my recent chats
```
### Output
```markdown
# Your Developer Growth Report
**Report Period**: November 9-10, 2024
**Last Updated**: November 10, 2024, 9:15 PM UTC
## Work Summary
Over the past two days, you focused on backend infrastructure and API development. Your primary project was an open-source showcase application, where you made significant progress on connections management, UI improvements, and deployment configuration. You worked with TypeScript, React, and Node.js, tackling challenges ranging from data security to responsive design. Your work shows a balance between implementing features and addressing technical debt.
## Improvement Areas (Prioritized)
### 1. Advanced TypeScript Patterns and Type Safety
**Why This Matters**: TypeScript is central to your work, but leveraging its advanced features (generics, utility types, conditional types, type guards) can significantly improve code reliability and reduce runtime errors. Better type safety catches bugs at compile time rather than in production.
**What I Observed**: In your recent chats, you were working with connection data structures and struggled a few times with typing auth configurations properly. You also had to iterate on union types for different connection states. There's an opportunity to use discriminated unions and type guards more effectively.
**Recommendation**: Study TypeScript's advanced type system, particularly utility types (Omit, Pick, Record), conditional types, and discriminated unions. Apply these patterns to your connection configuration handling and auth state management.
**Time to Skill Up**: 5-8 hours of focused learning and practice
### 2. Secure Data Handling and Information Hiding in UI
**Why This Matters**: You identified and fixed a security concern where sensitive connection data was being displayed in your console. Preventing information leakage is critical for applications handling user credentials and API keys. Good practices here prevent security incidents and user trust violations.
**What I Observed**: You caught that your "Your Apps" page was showing full connection data including auth configs. This shows good security instincts, and the next step is building this into your default thinking when handling sensitive information.
**Recommendation**: Review security best practices for handling sensitive data in frontend applications. Create reusable patterns for filtering/masking sensitive information before displaying it. Consider implementing a secure data layer that explicitly whitelist what can be shown in the UI.
**Time to Skill Up**: 3-4 hours
### 3. Component Architecture and Responsive UI Patterns
**Why This Matters**: You're designing UIs that need to work across different screen sizes and user interactions. Strong component architecture makes it easier to build complex UIs without bugs and improves maintainability.
**What I Observed**: You worked on the "Marketplace" UI (formerly Browse Tools), recreating it from a design image. You also identified and fixed scrolling issues where content was overflowing containers. There's an opportunity to strengthen your understanding of layout containment and responsive design patterns.
**Recommendation**: Study React component composition patterns and CSS layout best practices (especially flexbox and grid). Focus on container queries and responsive patterns that prevent overflow issues. Look into component composition libraries and design system approaches.
**Time to Skill Up**: 6-10 hours (depending on depth)
## Strengths Observed
- **Security Awareness**: You proactively identified data leakage issues before they became problems
- **Iterative Refinement**: You worked through UI requirements methodically, asking clarifying questions and improving designs
- **Full-Stack Capability**: You comfortably work across backend APIs, frontend UI, and deployment concerns
- **Problem-Solving Approach**: You break down complex tasks into manageable steps
## Action Items
Priority order:
1. Spend 1-2 hours learning TypeScript utility types and discriminated unions; apply to your connection data structures
2. Document security patterns for your project (what data is safe to display, filtering/masking functions)
3. Study one article on advanced React patterns and apply one pattern to your current UI work
4. Set up a code review checklist focused on type safety and data security for future PRs
## Curated Learning Resources
### For: Advanced TypeScript Patterns
1. **TypeScript's Advanced Types: Generics, Utility Types, and Conditional Types** - HackerNews, October 2024
Deep dive into TypeScript's type system with practical examples and real-world applications. Covers discriminated unions, type guards, and patterns for ensuring compile-time safety in complex applications.
[Link to discussion]
2. **Building Type-Safe APIs in TypeScript** - HackerNews, September 2024
Practical guide to designing APIs with TypeScript that catch errors early. Particularly relevant for your connection configuration work.
[Link to discussion]
### For: Secure Data Handling in Frontend
1. **Preventing Information Leakage in Web Applications** - HackerNews, August 2024
Comprehensive guide to data security in frontend applications, including filtering sensitive information, secure logging, and audit trails.
[Link to discussion]
2. **OAuth and API Key Management Best Practices** - HackerNews, July 2024
How to safely handle authentication tokens and API keys in applications, with examples for different frameworks.
[Link to discussion]
### For: Component Architecture and Responsive Design
1. **Advanced React Patterns: Composition Over Configuration** - HackerNews
Explores component composition strategies that scale, with examples using modern React patterns.
[Link to discussion]
2. **CSS Layout Mastery: Flexbox, Grid, and Container Queries** - HackerNews, October 2024
Learn responsive design patterns that prevent overflow issues and work across all screen sizes.
[Link to discussion]
```
## Tips and Best Practices
- Run this analysis once a week to track your improvement trajectory over time
- Pick one improvement area at a time and focus on it for a few days before moving to the next
- Use the learning resources as a study guide; work through the recommended materials and practice applying the patterns
- Revisit this report after focusing on an area for a week to see how your work patterns change
- The learning resources are intentionally curated for your actual work, not generic topics, so they'll be highly relevant to what you're building
## How Accuracy and Quality Are Maintained
This skill:
- Analyzes your actual work patterns from timestamped chat history
- Generates evidence-based recommendations grounded in real projects
- Curates learning resources that directly address your identified gaps
- Focuses on actionable improvements, not vague feedback
- Provides specific time estimates based on complexity
- Prioritizes areas that will have the most impact on your development velocity

View File

@@ -0,0 +1,433 @@
---
name: file-organizer
description: Intelligently organizes your files and folders across your computer by understanding context, finding duplicates, suggesting better structures, and automating cleanup tasks. Reduces cognitive load and keeps your digital workspace tidy without manual effort.
---
# File Organizer
This skill acts as your personal organization assistant, helping you maintain a clean, logical file structure across your computer without the mental overhead of constant manual organization.
## When to Use This Skill
- Your Downloads folder is a chaotic mess
- You can't find files because they're scattered everywhere
- You have duplicate files taking up space
- Your folder structure doesn't make sense anymore
- You want to establish better organization habits
- You're starting a new project and need a good structure
- You're cleaning up before archiving old projects
## What This Skill Does
1. **Analyzes Current Structure**: Reviews your folders and files to understand what you have
2. **Finds Duplicates**: Identifies duplicate files across your system
3. **Suggests Organization**: Proposes logical folder structures based on your content
4. **Automates Cleanup**: Moves, renames, and organizes files with your approval
5. **Maintains Context**: Makes smart decisions based on file types, dates, and content
6. **Reduces Clutter**: Identifies old files you probably don't need anymore
## How to Use
### From Your Home Directory
```
cd ~
```
Then run Claude Code and ask for help:
```
Help me organize my Downloads folder
```
```
Find duplicate files in my Documents folder
```
```
Review my project directories and suggest improvements
```
### Specific Organization Tasks
```
Organize these downloads into proper folders based on what they are
```
```
Find duplicate files and help me decide which to keep
```
```
Clean up old files I haven't touched in 6+ months
```
```
Create a better folder structure for my [work/projects/photos/etc]
```
## Instructions
When a user requests file organization help:
1. **Understand the Scope**
Ask clarifying questions:
- Which directory needs organization? (Downloads, Documents, entire home folder?)
- What's the main problem? (Can't find things, duplicates, too messy, no structure?)
- Any files or folders to avoid? (Current projects, sensitive data?)
- How aggressively to organize? (Conservative vs. comprehensive cleanup)
2. **Analyze Current State**
Review the target directory:
```bash
# Get overview of current structure
ls -la [target_directory]
# Check file types and sizes
find [target_directory] -type f -exec file {} \; | head -20
# Identify largest files
du -sh [target_directory]/* | sort -rh | head -20
# Count file types
find [target_directory] -type f | sed 's/.*\.//' | sort | uniq -c | sort -rn
```
Summarize findings:
- Total files and folders
- File type breakdown
- Size distribution
- Date ranges
- Obvious organization issues
3. **Identify Organization Patterns**
Based on the files, determine logical groupings:
**By Type**:
- Documents (PDFs, DOCX, TXT)
- Images (JPG, PNG, SVG)
- Videos (MP4, MOV)
- Archives (ZIP, TAR, DMG)
- Code/Projects (directories with code)
- Spreadsheets (XLSX, CSV)
- Presentations (PPTX, KEY)
**By Purpose**:
- Work vs. Personal
- Active vs. Archive
- Project-specific
- Reference materials
- Temporary/scratch files
**By Date**:
- Current year/month
- Previous years
- Very old (archive candidates)
4. **Find Duplicates**
When requested, search for duplicates:
```bash
# Find exact duplicates by hash
find [directory] -type f -exec md5 {} \; | sort | uniq -d
# Find files with same name
find [directory] -type f -printf '%f\n' | sort | uniq -d
# Find similar-sized files
find [directory] -type f -printf '%s %p\n' | sort -n
```
For each set of duplicates:
- Show all file paths
- Display sizes and modification dates
- Recommend which to keep (usually newest or best-named)
- **Important**: Always ask for confirmation before deleting
5. **Propose Organization Plan**
Present a clear plan before making changes:
```markdown
# Organization Plan for [Directory]
## Current State
- X files across Y folders
- [Size] total
- File types: [breakdown]
- Issues: [list problems]
## Proposed Structure
```
[Directory]/
├── Work/
│ ├── Projects/
│ ├── Documents/
│ └── Archive/
├── Personal/
│ ├── Photos/
│ ├── Documents/
│ └── Media/
└── Downloads/
├── To-Sort/
└── Archive/
```
## Changes I'll Make
1. **Create new folders**: [list]
2. **Move files**:
- X PDFs → Work/Documents/
- Y images → Personal/Photos/
- Z old files → Archive/
3. **Rename files**: [any renaming patterns]
4. **Delete**: [duplicates or trash files]
## Files Needing Your Decision
- [List any files you're unsure about]
Ready to proceed? (yes/no/modify)
```
6. **Execute Organization**
After approval, organize systematically:
```bash
# Create folder structure
mkdir -p "path/to/new/folders"
# Move files with clear logging
mv "old/path/file.pdf" "new/path/file.pdf"
# Rename files with consistent patterns
# Example: "YYYY-MM-DD - Description.ext"
```
**Important Rules**:
- Always confirm before deleting anything
- Log all moves for potential undo
- Preserve original modification dates
- Handle filename conflicts gracefully
- Stop and ask if you encounter unexpected situations
7. **Provide Summary and Maintenance Tips**
After organizing:
```markdown
# Organization Complete! ✨
## What Changed
- Created [X] new folders
- Organized [Y] files
- Freed [Z] GB by removing duplicates
- Archived [W] old files
## New Structure
[Show the new folder tree]
## Maintenance Tips
To keep this organized:
1. **Weekly**: Sort new downloads
2. **Monthly**: Review and archive completed projects
3. **Quarterly**: Check for new duplicates
4. **Yearly**: Archive old files
## Quick Commands for You
```bash
# Find files modified this week
find . -type f -mtime -7
# Sort downloads by type
[custom command for their setup]
# Find duplicates
[custom command]
```
Want to organize another folder?
```
## Examples
### Example 1: Organizing Downloads (From Justin Dielmann)
**User**: "My Downloads folder is a mess with 500+ files. Help me organize it."
**Process**:
1. Analyzes Downloads folder
2. Finds patterns: work docs, personal photos, installers, random PDFs
3. Proposes structure:
- Downloads/
- Work/
- Personal/
- Installers/ (DMG, PKG files)
- Archive/
- ToSort/ (things needing decisions)
4. Asks for confirmation
5. Moves files intelligently based on content and names
6. Results: 500 files → 5 organized folders
### Example 2: Finding and Removing Duplicates
**User**: "Find duplicate files in my Documents and help me decide which to keep."
**Output**:
```markdown
# Found 23 Sets of Duplicates (156 MB total)
## Duplicate Set 1: "proposal.pdf"
- `/Documents/proposal.pdf` (2.3 MB, modified: 2024-03-15)
- `/Documents/old/proposal.pdf` (2.3 MB, modified: 2024-03-15)
- `/Desktop/proposal.pdf` (2.3 MB, modified: 2024-03-10)
**Recommendation**: Keep `/Documents/proposal.pdf` (most recent in correct location)
Delete the other 2 copies?
[Continue for all duplicates...]
```
### Example 3: Restructuring Projects Folder
**User**: "Review my ~/Projects directory and suggest improvements."
**Output**:
```markdown
# Analysis of ~/Projects
## Current Structure Issues
- Mix of active and archived projects (3+ years old)
- No consistent naming convention
- Some projects at root, others in random subfolders
- Duplicate folders (project-name, project-name-old, project-name-v2)
## Proposed Structure
```
Projects/
├── Active/
│ ├── client-work/
│ ├── side-projects/
│ └── learning/
├── Archive/
│ ├── 2022/
│ ├── 2023/
│ └── 2024/
└── Templates/
```
## Specific Changes
1. Move 12 projects not touched since 2022 → Archive/
2. Consolidate 4 duplicate project folders
3. Rename projects to consistent format: "client-name-project-name"
4. Create Archive for old work
Want me to implement this?
```
### Example 4: Organizing Photos by Date
**User**: "Organize my photo folders by year and month."
**Output**: Creates structure like:
```
Photos/
├── 2023/
│ ├── 01-January/
│ ├── 02-February/
│ └── ...
├── 2024/
│ ├── 01-January/
│ └── ...
└── Unsorted/
```
Then moves photos based on EXIF data or file modification dates.
## Common Organization Tasks
### Downloads Cleanup
```
Organize my Downloads folder - move documents to Documents,
images to Pictures, keep installers separate, and archive files
older than 3 months.
```
### Project Organization
```
Review my Projects folder structure and help me separate active
projects from old ones I should archive.
```
### Duplicate Removal
```
Find all duplicate files in my Documents folder and help me
decide which ones to keep.
```
### Desktop Cleanup
```
My Desktop is covered in files. Help me organize everything into
my Documents folder properly.
```
### Photo Organization
```
Organize all photos in this folder by date (year/month) based
on when they were taken.
```
### Work/Personal Separation
```
Help me separate my work files from personal files across my
Documents folder.
```
## Pro Tips
1. **Start Small**: Begin with one messy folder (like Downloads) to build trust
2. **Regular Maintenance**: Run weekly cleanup on Downloads
3. **Consistent Naming**: Use "YYYY-MM-DD - Description" format for important files
4. **Archive Aggressively**: Move old projects to Archive instead of deleting
5. **Keep Active Separate**: Maintain clear boundaries between active and archived work
6. **Trust the Process**: Let Claude handle the cognitive load of where things go
## Best Practices
### Folder Naming
- Use clear, descriptive names
- Avoid spaces (use hyphens or underscores)
- Be specific: "client-proposals" not "docs"
- Use prefixes for ordering: "01-current", "02-archive"
### File Naming
- Include dates: "2024-10-17-meeting-notes.md"
- Be descriptive: "q3-financial-report.xlsx"
- Avoid version numbers in names (use version control instead)
- Remove download artifacts: "document-final-v2 (1).pdf" → "document.pdf"
### When to Archive
- Projects not touched in 6+ months
- Completed work that might be referenced later
- Old versions after migration to new systems
- Files you're hesitant to delete (archive first)
## Related Use Cases
- Setting up organization for a new computer
- Preparing files for backup/archiving
- Cleaning up before storage cleanup
- Organizing shared team folders
- Structuring new project directories

168
skills/skills-index.json Normal file
View File

@@ -0,0 +1,168 @@
{
"version": "1.0.0",
"skills": [
{
"name": "content-research-writer",
"category": "content",
"description": "Research, write, and cite high-quality content with collaborative outlining and section-by-section feedback",
"source": "awesome-claude-skills/content-research-writer"
},
{
"name": "file-organizer",
"category": "productivity",
"description": "Organize and structure files systematically",
"source": "awesome-claude-skills/file-organizer"
},
{
"name": "developer-growth-analysis",
"category": "development",
"description": "Analyze and improve development practices and career growth",
"source": "awesome-claude-skills/developer-growth-analysis"
},
{
"name": "document-skills",
"category": "document",
"description": "Process, analyze, and extract information from documents",
"source": "awesome-claude-skills/document-skills"
},
{
"name": "image-enhancer",
"category": "media",
"description": "Enhance and optimize images",
"source": "awesome-claude-skills/image-enhancer"
},
{
"name": "video-downloader",
"category": "media",
"description": "Download and process video content",
"source": "awesome-claude-skills/video-downloader"
},
{
"name": "tailored-resume-generator",
"category": "writing",
"description": "Create customized, targeted resumes",
"source": "awesome-claude-skills/tailored-resume-generator"
},
{
"name": "changelog-generator",
"category": "writing",
"description": "Generate project changelogs from commits and changes",
"source": "awesome-claude-skills/changelog-generator"
},
{
"name": "brand-guidelines",
"category": "business",
"description": "Maintain and apply brand guidelines consistently",
"source": "awesome-claude-skills/brand-guidelines"
},
{
"name": "canvas-design",
"category": "creative",
"description": "Create canvas designs and visual layouts",
"source": "awesome-claude-skills/canvas-design"
},
{
"name": "meeting-insights-analyzer",
"category": "productivity",
"description": "Extract insights and action items from meeting notes",
"source": "awesome-claude-skills/meeting-insights-analyzer"
},
{
"name": "internal-comms",
"category": "business",
"description": "Improve internal communications and messaging",
"source": "awesome-claude-skills/internal-comms"
},
{
"name": "domain-name-brainstormer",
"category": "tools",
"description": "Generate creative domain name ideas",
"source": "awesome-claude-skills/domain-name-brainstormer"
},
{
"name": "invoice-organizer",
"category": "business",
"description": "Organize and categorize invoices and financial documents",
"source": "awesome-claude-skills/invoice-organizer"
},
{
"name": "webapp-testing",
"category": "development",
"description": "Test and validate web applications",
"source": "awesome-claude-skills/webapp-testing"
},
{
"name": "mcp-builder",
"category": "development",
"description": "Build Model Context Protocol integrations",
"source": "awesome-claude-skills/mcp-builder"
},
{
"name": "connect-apps",
"category": "automation",
"description": "Connect to 500+ apps via Composio for automation",
"source": "awesome-claude-skills/connect-apps"
},
{
"name": "competitive-ads-extractor",
"category": "business",
"description": "Analyze competitor advertising strategies",
"source": "awesome-claude-skills/competitive-ads-extractor"
},
{
"name": "lead-research-assistant",
"category": "business",
"description": "Research and qualify business leads",
"source": "awesome-claude-skills/lead-research-assistant"
},
{
"name": "theme-factory",
"category": "creative",
"description": "Generate themes and design concepts",
"source": "awesome-claude-skills/theme-factory"
},
{
"name": "twitter-algorithm-optimizer",
"category": "social",
"description": "Optimize content for Twitter/X algorithm",
"source": "awesome-claude-skills/twitter-algorithm-optimizer"
},
{
"name": "slack-gif-creator",
"category": "tools",
"description": "Create GIFs for Slack messaging",
"source": "awesome-claude-skills/slack-gif-creator"
},
{
"name": "raffle-winner-picker",
"category": "tools",
"description": "Select random winners fairly for giveaways",
"source": "awesome-claude-skills/raffle-winner-picker"
},
{
"name": "langsmith-fetch",
"category": "development",
"description": "Fetch and analyze LangSmith data",
"source": "awesome-claude-skills/langsmith-fetch"
},
{
"name": "skill-creator",
"category": "tools",
"description": "Create new custom skills for QwenClaw",
"source": "awesome-claude-skills/skill-creator"
}
],
"categories": [
"content",
"productivity",
"development",
"document",
"media",
"writing",
"business",
"creative",
"tools",
"automation",
"social"
]
}

View File

@@ -157,30 +157,20 @@ function nextAllowedHeartbeatAt(
}
async function setupStatusline() {
console.log("[QwenClaw SetupStatusline] Starting...");
await mkdir(QWEN_DIR, { recursive: true });
console.log("[QwenClaw SetupStatusline] Directory created:", QWEN_DIR);
await writeFile(STATUSLINE_FILE, STATUSLINE_SCRIPT);
console.log("[QwenClaw SetupStatusline] Statusline script written:", STATUSLINE_FILE);
let settings: Record<string, unknown> = {};
try {
const settingsText = await Bun.file(QWEN_SETTINGS_FILE).text();
console.log("[QwenClaw SetupStatusline] Settings text read, length:", settingsText.length);
settings = JSON.parse(settingsText);
console.log("[QwenClaw SetupStatusline] Settings parsed");
} catch (err) {
console.log("[QwenClaw SetupStatusline] No existing settings or error:", err);
settings = await Bun.file(QWEN_SETTINGS_FILE).json();
} catch {
// file doesn't exist or isn't valid JSON
}
settings.statusLine = {
type: "command",
command: "node .qwen/statusline.cjs",
};
const settingsJson = JSON.stringify(settings, null, 2) + "\n";
console.log("[QwenClaw SetupStatusline] Writing settings:", settingsJson.substring(0, 100));
await writeFile(QWEN_SETTINGS_FILE, settingsJson);
console.log("[QwenClaw SetupStatusline] Settings written");
await writeFile(QWEN_SETTINGS_FILE, JSON.stringify(settings, null, 2) + "\n");
}
async function teardownStatusline() {
@@ -202,10 +192,6 @@ async function teardownStatusline() {
// --- Main ---
export async function start(args: string[] = []) {
console.log("[QwenClaw Start] Function called with args:", args);
try {
let hasPromptFlag = false;
let hasTriggerFlag = false;
let telegramFlag = false;
@@ -215,7 +201,6 @@ export async function start(args: string[] = []) {
let webPortFlag: number | null = null;
const payloadParts: string[] = [];
console.log("[QwenClaw Start] Parsing arguments...");
for (let i = 0; i < args.length; i++) {
const arg = args[i];
if (arg === "--prompt") {
@@ -248,8 +233,6 @@ export async function start(args: string[] = []) {
}
}
const payload = payloadParts.join(" ").trim();
console.log("[QwenClaw Start] Payload:", payload, "hasPromptFlag:", hasPromptFlag, "webFlag:", webFlag);
if (hasPromptFlag && !payload) {
console.error("Usage: qwenclaw start --prompt <prompt> [--trigger] [--telegram] [--debug] [--web] [--web-port <port>] [--replace-existing]");
process.exit(1);
@@ -267,7 +250,6 @@ export async function start(args: string[] = []) {
process.exit(1);
}
console.log("[QwenClaw Start] Checking existing daemon...");
// One-shot mode: explicit prompt without trigger.
if (hasPromptFlag && !hasTriggerFlag) {
const existingPid = await checkExistingDaemon();
@@ -315,31 +297,14 @@ export async function start(args: string[] = []) {
}
await initConfig();
console.log("[QwenClaw Start] Config initialized");
const settings = await loadSettings();
console.log("[QwenClaw Start] Settings loaded, web:", settings.web);
await ensureProjectQwenMd();
console.log("[QwenClaw Start] Project QWEN.md ensured");
const jobs = await loadJobs();
console.log("[QwenClaw Start] Jobs loaded:", jobs.length);
const webEnabled = webFlag || webPortFlag !== null || settings.web.enabled;
const webPort = webPortFlag ?? settings.web.port;
console.log("[QwenClaw Start] Web enabled:", webEnabled, "Port:", webPort);
try {
await setupStatusline();
console.log("[QwenClaw Start] Statusline setup complete");
} catch (err) {
console.error("[QwenClaw Start] Statusline setup error:", err);
}
await writePidFile();
console.log("[QwenClaw Start] PID file written");
let web: WebServerHandle | null = null;
async function shutdown() {
@@ -688,9 +653,5 @@ export async function start(args: string[] = []) {
}
updateState();
}, 60_000);
} catch (err) {
console.error("[QwenClaw Start] Fatal error:", err);
process.exit(1);
}
}

View File

@@ -8,8 +8,6 @@ const args = process.argv.slice(2);
const command = args[0];
async function main() {
console.log("[QwenClaw] Index.ts - Command:", command);
if (command === "--stop-all") {
await stopAll();
} else if (command === "--stop") {
@@ -17,9 +15,7 @@ async function main() {
} else if (command === "--clear") {
await clear();
} else if (command === "start") {
console.log("[QwenClaw] Calling start function...");
await start(args.slice(1));
console.log("[QwenClaw] Start function returned");
} else if (command === "status") {
await status();
} else if (command === "telegram") {
@@ -27,7 +23,6 @@ async function main() {
} else if (command === "send") {
await send(args.slice(1));
} else {
console.log("[QwenClaw] No command, starting default...");
await start();
}
}
@@ -36,9 +31,3 @@ main().catch((err) => {
console.error("[QwenClaw] Fatal error:", err);
process.exit(1);
});
// Keep process alive
process.on('SIGINT', () => {
console.log('[QwenClaw] Received SIGINT, shutting down...');
process.exit(0);
});

View File

@@ -67,14 +67,20 @@ async function runQwenOnce(
const args = [...baseArgs];
if (model.trim()) args.push("--model", model.trim());
// Use qwen.cmd on Windows for proper execution
const qwenCommand = process.platform === "win32" ? "qwen.cmd" : "qwen";
// Cross-platform command detection
const qwenCommand = process.platform === "win32"
? "qwen.cmd"
: process.platform === "darwin"
? "qwen"
: "qwen";
const proc = Bun.spawn([qwenCommand, ...args], {
stdout: "pipe",
stderr: "pipe",
env: buildChildEnv(baseEnv, model, api),
shell: true,
// Detach on non-Windows to allow background execution
detached: process.platform !== "win32",
});
const [rawStdout, stderr] = await Promise.all([