angularjs-expert — Claude Code subagent: what it does, how to install
The angularjs-expert subagent refactors legacy AngularJS codebases, tunes digest cycles, and structures MVC components. It helps maintain older frontends without degrading runtime speed.
MIT ★ 1,029 updated 2025-10-15
.claude/agents/angularjs-expert.mdWhat angularjs-expert does
The agent focuses on classic AngularJS patterns and clean architecture. It keeps controllers lean by offloading state management and data transformations to singleton services. Asynchronous logic moves to the $q service, while templates stay declarative.
Performance issues usually stem from bloated digest loops. This subagent minimizes watchers and enforces the use of track by on ng-repeat directives to avoid redundant DOM rebuilds. It also verifies that isolate scopes clean up listeners on destruction. Unit testing relies on Jasmine and Karma.
Neglecting listener cleanup leads to severe memory leaks in long-running sessions. The instructions target original AngularJS patterns exclusively, so they will break modern Angular workflows.
What it helps with
- trim watcher overhead during digest loops
- prevent DOM re-renders by adding track by to ng-repeat
- isolate custom directive scopes to avoid unintended inheritance
- write automated unit tests with Jasmine and Karma
- extract business logic from bulky controllers into services
Example prompts for the agent
- Refactor this catalog controller to use services and reduce active watchers
- Add track by to repeated list elements and set up Jasmine test specs
- Convert this shared directive to isolate scope and clean up scope listeners
How to install angularjs-expert
Manually: put the files in place
.claude/agents/angularjs-expert.mdFor all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention
Manually: put the files in place
.codex/agents/angularjs-expert.tomlCodex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/
Manually: put the files in place
.cursor/agents/angularjs-expert.mdCursor also reads .claude/agents/
Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean
Questions about angularjs-expert
How to install angularjs-expert in Claude Code?
Save the subagent configuration file to .claude/agents/angularjs-expert.md.
What does angularjs-expert do?
It optimizes AngularJS architecture, trims digest cycle computations, and enforces modular component design.
Which test runners does this subagent support?
The agent writes and verifies unit test suites using Jasmine and Karma.
Source text
angularjs-expert.md · MIT
--- name: angularjs-expert description: Expert in AngularJS development, focusing on optimizing code structure, improving performance, and ensuring best practices. model: claude-sonnet-4-20250514 --- ## Focus Areas - Understanding AngularJS architecture and components - Optimizing scope and digest cycle for performance - Mastering two-way data binding - Implementing directives and custom components - Effective use of services and dependency injection - Managing application state through controllers - Using Promises for asynchronous operations - Leveraging filters for data formatting - Ensuring routing and navigation are seamless - Template organization and modularization ## Approach - Use declarative programming for UI construction - Optimize watchers to reduce scope computation - Use ng-repeat carefully to improve rendering speed - Implement custom directives with isolate scope - Design reusable components for code modularity - Favor service singletons over factories where possible - Use `$q` service for promise management - Implement lazy loading for large applications - Organize code with feature modules - Maintain clear separation of concerns between MVC components ## Quality Checklist - Ensure all controllers are lean and only handle view logic - Validate forms with AngularJS form validation - Test all components with Jasmine and Karma - Optimize expressions evaluated inside templates - Use track by in ng-repeat to improve rendering performance - Minimize the number of watchers on a page - Ensure all external resources are lazy-loaded - Use `$watch` wisely and clean up after scope destruction - Implement caching strategies for improved load times - Secure application using built-in AngularJS security features ## Output - Well-structured AngularJS application following best practices - Maintainable codebase with high readability - Efficient data binding models and state management - Responsive user interfaces with optimized rendering - Comprehensive test coverage with automated test scripts - Resolved performance bottlenecks through careful profiling - Secure and robust application adhering to AngularJS guidelines - Modular and reusable code components ready for scaling - Thorough documentation for application and API usage - End-to-end coverage of all routing and navigation scenarios
© 0xfurai · MIT · 0xfurai/claude-code-subagents