Skip to content
Back to skills

Qclaw Asar Hotfix

ASecurity

Patch packaged QClaw.app (no source code) by modifying app.asar frontend bundles. Use when users have older QClaw versions and need to: (1) make invite-code checks only active on localhost with DEV_MODE=true and bypassed in production, (2) remove visibility restrictions for `other` and `system-config` model providers, and (3) ensure these providers appear in the model vendor dropdown.

  • 2 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added November 26, 2026
toolspythonbashfrontend

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned November 26, 2026

npx -y skills add tangchunwu/skill-hub --skill qclaw-asar-hotfix --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Qclaw Asar Hotfix?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Qclaw Asar Hotfix
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tangchunwu-qclaw-asar-hotfix/badge)](https://www.skillsdirectory.com/skills/tangchunwu-qclaw-asar-hotfix)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: qclaw-asar-hotfix
description: "Patch packaged QClaw.app (no source code) by modifying app.asar frontend bundles. Use when users have older QClaw versions and need to: (1) make invite-code checks only active on localhost with DEV_MODE=true and bypassed in production, (2) remove visibility restrictions for `other` and `system-config` model providers, and (3) ensure these providers appear in the model vendor dropdown."
---

# QClaw Asar Hotfix

## Overview

Use this skill when the user only has a packaged `QClaw.app` and needs the same frontend hotfix across old versions.

This skill ships one deterministic patcher script:
- `scripts/patch_qclaw_asar.py`

## Workflow

1. Run patch in non-destructive mode first.

```bash
python3 /Users/tangchunwu/.codex/skills/qclaw-asar-hotfix/scripts/patch_qclaw_asar.py \
  --app /Applications/QClaw.app \
  --output ~/Desktop/app.asar.patched \
  --no-install
```

2. If patch summary looks correct, apply to the app in place.

```bash
python3 /Users/tangchunwu/.codex/skills/qclaw-asar-hotfix/scripts/patch_qclaw_asar.py \
  --app /Applications/QClaw.app
```

3. Ask the user to fully quit and reopen QClaw.

## What The Script Patches

- Invite-code gate in chat/login frontend:
  - Enable check only when `location.hostname=="localhost" && localStorage.DEV_MODE==="true"`
  - Bypass in production/non-localhost
- Model provider visibility:
  - Remove frontend filters that hide `system-config`
  - Add `other` provider option to model vendor dropdown when missing
  - Ensure provider sets/maps include `other` and `system-config`

## Validation Checklist

After patching, verify by extracting the output asar and checking these expectations:

1. Invite code gate is DEV_MODE-local only.
2. Model-setting provider list includes both `other` and `用户系统配置`.
3. No residual filter like `filter(k=>k.key!==vn)` for provider visibility.

Suggested checks:

```bash
TMP=$(mktemp -d)
cd "$TMP"
npx -y @electron/asar extract /Applications/QClaw.app/Contents/Resources/app.asar ext
rg -n -F 'localStorage.getItem("DEV_MODE")==="true"' ext/out/renderer/assets/*.js
rg -n -F 'key:"other",label:"其他"' ext/out/renderer/assets/*.js
rg -n -F 'key:vn,label:"用户系统配置"' ext/out/renderer/assets/*.js
rg -n -F 'l.filter(k=>k.key!==vn)' ext/out/renderer/assets/*.js || true
```

## Rollback

The script creates a backup next to `app.asar`:
- `app.asar.bak.hotfix.<timestamp>`

Rollback command:

```bash
cp /Applications/QClaw.app/Contents/Resources/app.asar.bak.hotfix.<timestamp> \
   /Applications/QClaw.app/Contents/Resources/app.asar
```

## Notes

- Prefer running with `--no-install` first for unknown versions.
- If script reports `未匹配到可修改的补丁位点`, inspect `out/renderer/assets/*.js` and extend patch literals/regex in `scripts/patch_qclaw_asar.py`.
- Keep edits scoped to renderer bundles; do not modify binary/executable files.

Files in this skill

  • SKILL.md2.9 KB
  • agents/openai.yaml290 B
  • scripts/patch_qclaw_asar.py10.4 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in tools →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.