Memory issues manifest as crashes after prolonged use. Core principle 90% of memory leaks follow 3 patterns (retain cycles, timer/observer leaks, collection growth). Diagnose systematically with Instruments, never guess.
Works with
AI-first code editor with Composer
Before installing skills in Cursor, ensure your development environment meets these requirements:
node --versionaxiom-memory-debuggingExecute the skills CLI command in your project's root directory to begin installation:
Fetches axiom-memory-debugging from charleswiltgen/axiom and configures it for Cursor.
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Confirm successful installation by checking the skill directory location:
Restart Cursor to activate axiom-memory-debugging. Access via /axiom-memory-debugging in your agent's command palette.
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
Submit your Claude Code skill and start earning
Create detailed user stories, acceptance criteria, and feature specs
Example
Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios
Reduce spec writing time by 50%, ensure comprehensive coverage
Research competitors, compare features, identify gaps
Example
Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities
Complete competitive research in 2 hours instead of 2 days
Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs
Example
Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale
0
total installs
0
this week
767
GitHub stars
0
upvotes
Run in your terminal
0
installs
0
this week
767
stars
Memory issues manifest as crashes after prolonged use. Core principle 90% of memory leaks follow 3 patterns (retain cycles, timer/observer leaks, collection growth). Diagnose systematically with Instruments, never guess.
Leak vs normal: Normal = stays at 100MB. Leak = 50MB → 100MB → 150MB → 200MB → CRASH.
ALWAYS diagnose FIRST (before reading code):
What this tells you: Flat = not a leak. Linear growth = classic leak. Spike then flat = normal cache. Spikes stacking = compound leak.
Why diagnostics first: Finding leak with Instruments: 5-15 min. Guessing: 45+ min.
Key instruments: Heap Allocations (object count), Leaked Objects (direct detection), VM Tracker (by type).
// Add deinit logging to suspect classes
class MyViewController: UIViewController {
deinit { print("✅ MyViewController deallocated") }
}
@MainActor
class ViewModel: ObservableObject {
deinit { print("✅ ViewModel deallocated") }
}
Navigate to view, navigate away. See "✅ deallocated"? Yes = no leak. No = retained somewhere.
Jetsam is not a bug — iOS terminates background apps to free memory. Not a crash (no crash log), but frequent kills hurt UX.
| Termination | Cause | Solution |
|---|---|---|
| Memory Limit Exceeded | Your app used too much memory | Reduce peak footprint |
| Jetsam | System needed memory for other apps | Reduce background memory to <50MB |
Clear caches on backgrounding:
// SwiftUI
.onChange(of: scenePhase) { _, newPhase in
if newPhase == .background {
imageCache.clearAll()
URLCache.shared.removeAllCachedResponses()
}
}
Users shouldn't notice jetsam. Use @SceneStorage (SwiftUI) or stateRestorationActivity (UIKit) to restore navigation position, drafts, and scroll position.
class JetsamMonitor: NSObject, MXMetricManagerSubscriber {
func didReceive(_ payloads: [MXMetricPayload]) {
for payload in payloads {
guard let exitData = payload.applicationExitMetrics else { continue }
let bgData = exitData.backgroundExitData
if bgData.cumulativeMemoryPressureExitCount > 0 {
// Send to analytics
}
}
}
}
App memory grows while in USE? → Memory leak (fix retention)
App killed in BACKGROUND? → Jetsam (reduce bg memory)
Why [weak self] alone doesn't fix timer leaks: The RunLoop retains scheduled timers. [weak self] only prevents the closure from retaining self — the Timer object itself continues to exist and fire. You must explicitly invalidate() to break the RunLoop's retention.
progressTimer = Timer.scheduledTimer(withTimeInterval: 1.0, repeats: true) { [weak self] _ in
self?.updateProgress()
}
// Timer never stopped → RunLoop keeps it alive and firing forever
cancellable = Timer.publish(every: 1.0, tolerance: 0.1, on: .main, in: .default)
.autoconnect()
.sink { [weak self] _ in self?.updateProgress() }
// No deinit needed — cancellable auto-cleans when released
Alternative: Call timer?.invalidate(); timer = nil in both the appropriate teardown method (viewWillDisappear, stop method, etc.) AND deinit.
For timer crash patterns (EXC_BAD_INSTRUCTION) and RunLoop mode issues, see
axiom-timer-patterns.
NotificationCenter.default.addObserver(self, selector: #selector(handle),
name: AVAudioSession.routeChangeNotification, object: nil)
// No matching removeObserver → accumulates listeners
NotificationCenter.default.publisher(for: AVAudioSession.routeChangeNotification)
.sink { [weak self] _ in self?.handleChange() }
.store(in: &cancellables) // Auto-cleanup with viewModel
Alternative: NotificationCenter.default.removeObserver(self) in deinit.
updateCallbacks.append { [self] track in
self.refreshUI(with: track) // Strong capture → cycle
}
updateCallbacks.append { [weak self] track in
self?.refreshUI(with: track)
}
Clear callback arrays in deinit. Use [unowned self] only when certain self outlives the closure.
player?.onPlaybackEnd = { [self] in self.playNextTrack() }
// self → player → closure → self (cycle)
player?.onPlaybackEnd = { [weak self] in self?.playNextTrack() }
Use the delegation pattern with AnyObject protocol (enables weak references) instead of closures that capture view controllers.
PHImageManager.requestImage() returns a PHImageRequestID that must be cancelled. Without cancellation, pending requests queue up and hold memory when scrolling.
class PhotoCell: UICollectionViewCell {
private var imageRequestID: PHImageRequestID = PHInvalidImageRequestID
func configure(with asset: PHAsset, imageManager: PHImageManager) {
if imageRequestID != PHInvalidImageRequestID {
imageManager.cancelImageRequest(imageRequestID)
}
imageRequestID = imageManager.requestImage(for: asset, targetSize: PHImageManagerMaximumSize,
contentMode: .aspectFill, options: nil) { [weak self] image, _ in
self?.imageView.image = image
}
}
✓Make data-driven prioritization decisions faster
Stakeholder Communication
Draft PRDs, status updates, and stakeholder presentations
Example
Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement
✓Save 3-5 hours/week on communication overhead
Implementation Guide
Prerequisites
- ›Claude Desktop or compatible AI client
- ›Access to product documentation and roadmap tools (Jira, Notion, etc.)
- ›Understanding of product management frameworks (RICE, Jobs-to-be-Done, etc.)
- ›Stakeholder contact information and communication channels
Time Estimate
30-60 minutes to see productivity improvements
Steps
- 1Install product management skill
- 2Start with user story generation for known feature
- 3Progress to competitive analysis: research 2-3 competitors
- 4Use for roadmap prioritization: apply RICE/ICE scoring
- 5Draft stakeholder communications and refine based on feedback
- 6Build template library for recurring PM tasks
- 7Share effective prompts with product team
Common Pitfalls
- ⚠Not validating competitive research—verify facts before sharing
- ⚠Accepting user stories without involving engineering team
- ⚠Over-relying on frameworks without qualitative judgment
- ⚠Not customizing outputs to company culture and communication style
- ⚠Skipping stakeholder validation of generated requirements
Best Practices
✓ Do
- +Validate research and competitive analysis with real data
- +Collaborate with engineering when generating technical requirements
- +Customize frameworks and templates to your company context
- +Use skill for first drafts, refine with stakeholder input
- +Document successful prompt patterns for PM tasks
- +Combine AI efficiency with human judgment and intuition
✗ Don't
- −Don't publish competitive analysis without fact-checking
- −Don't finalize user stories without engineering review
- −Don't make prioritization decisions solely on AI scoring
- −Don't skip customer validation of generated requirements
- −Don't ignore company-specific context and culture
💡 Pro Tips
- ★Provide context: company goals, constraints, customer feedback
- ★Ask for alternatives: 'Show 3 ways to prioritize this roadmap'
- ★Request stakeholder-specific formatting: 'Executive summary vs. engineering spec'
- ★Use skill for 70% generation + 30% customization to company needs
When to Use This
✓ Use when
Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.
✗ Avoid when
Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.
Learning Path
- 1Basic: user stories, feature specs, status updates
- 2Intermediate: competitive analysis, prioritization frameworks, PRDs
- 3Advanced: product strategy, go-to-market planning, OKR setting
- 4Expert: product vision, market positioning, business model innovation
Related Skills
grill-me
704mattpocock/skills
Productivitysame categorypremortem
218parcadei/continuous-claude-v3
Productivitysame categorydeslop
163cursor/plugins
Productivitysame categorytravel-planner
145ailabs-393/ai-labs-claude-skills
Productivitysame categorynutritional-specialist
140ailabs-393/ai-labs-claude-skills
Productivitysame categoryframer-motion
140pproenca/dot-skills
Productivitysame categoryReviews
4.7★★★★★38 reviews- MMateo Shah★★★★★Dec 24, 2024
axiom-memory-debugging reduced setup friction for our internal harness; good balance of opinion and flexibility.
- GGanesh Mohane★★★★★Dec 20, 2024
Keeps context tight: axiom-memory-debugging is the kind of skill you can hand to a new teammate without a long onboarding doc.
- AAlexander Anderson★★★★★Dec 20, 2024
axiom-memory-debugging has been reliable in day-to-day use. Documentation quality is above average for community skills.
- SShikha Mishra★★★★★Dec 12, 2024
Solid pick for teams standardizing on skills: axiom-memory-debugging is focused, and the summary matches what you get after install.
- HHassan Martin★★★★★Nov 15, 2024
I recommend axiom-memory-debugging for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
- AAlexander Zhang★★★★★Nov 11, 2024
axiom-memory-debugging fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
- YYash Thakker★★★★★Nov 3, 2024
We added axiom-memory-debugging from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
- DDhruvi Jain★★★★★Oct 22, 2024
axiom-memory-debugging fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
- AAmina Kapoor★★★★★Oct 6, 2024
Useful defaults in axiom-memory-debugging — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- AAanya White★★★★★Oct 2, 2024
We added axiom-memory-debugging from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
showing 1-10 of 38
1 / 4Discussion
Comments — not star reviews- No comments yet — start the thread.