# Self Modify

> Modify the Anyapp app's own source code safely. Use when the user wants to change app behavior, add features, or fix bugs. Use when this capability is needed.

- Skill: `tomevault-io/self-modify` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/self-modify`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/self-modify/raw
- Safety review: pending (external: skill-scanner PASS, skillspector CAUTION)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/self-modify

---


# Self-Modification

When modifying Anyapp's source code:

1. Read the current file before modifying
2. Make incremental changes, not wholesale rewrites
3. Preserve existing imports and type safety
4. Run typecheck after changes
5. If build fails, analyze and fix or rollback
6. Notify user before restarting

## Safety

- All changes are auto-committed to git
- Use version_history to see recent changes
- Use version_rollback to undo mistakes
- Create a branch for risky experiments

## Architecture

- `apps/electron/` - Electron desktop app
  - `src/main/` - Main process (Node.js)
  - `src/preload/` - Context bridge
  - `src/renderer/` - React UI
- `packages/core/` - Shared TypeScript types
- `packages/shared/` - Business logic

## Best Practices

- Follow existing patterns in the codebase
- Use TSDoc comments for documentation
- Maintain type safety - avoid `any`
- Test changes before committing

---
> Converted and distributed by [TomeVault](https://tomevault.io/claim/guyettinger) — claim your Tome and manage your conversions.
<!-- tomevault:4.0:skill_md:2026-04-15 -->

