code-optimization
Minimal, dependency-light, async-first software architecture and code optimization.
Skill by alakbarr
Chalk Labs
Need help deploying code-optimization?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/alakbarr-code-optimization
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md and code. Checked Nov 2, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/code-optimization
What's inside
- Skill name
code-optimization- Description
- Minimal, dependency-light, async-first software architecture and code optimization.
- License
- MIT
- Instructions
- 38 lines in SKILL.md · view on GitHub
Before installing
- Instructions call the network
Files (1)
- SKILL.md
SKILL.md (first lines)
# Monika Architecture & Code Optimization Playbook
## 1. Async-First I/O Invariants
- **Non-Blocking Execution**: All database queries, MT5 IPC bridge calls, network scrapers, and external HTTP requests MUST use `async/await`.
- **Prohibited**: Never invoke synchronous `time.sleep()`, synchronous `requests.get()`, or blocking DB calls inside async loops. Use `asyncio.sleep()` or `httpx.AsyncClient`.
## 2. SQLAlchemy 2.0 Modern Standards
- **Use Modern 2.0 Syntax**: Strictly utilize `select(Model).where(...)` syntax. Legacy 1.x `session.query(Model)` is deprecated and prohibited.
- **Transaction Context Managers**: Always encapsulate database mutations within safe transactional boundaries:
```python
from database.safe_ops import safe_commit
# Preferred pattern
async with session.begin():
stmt = select(SystemConfig).where(SystemConfig.key == "example_key")
result = (await session.execute(stmt)).scalar_one_or_none()
```
## 3. EventBus Decoupling Pattern
- Use `EventBus.emit(event_type, payload)` for cross-subsystem communication (e.g. notifying risk guards, updating position trackers) rather than importing concrete stage modules directly.
- Keeps cognitive layers (`analysis/`), fortress layers (`risk/`), and execution layers (`execution/`) cleanly isolated.
## 4. Error Boundary & Tool Handlers Pattern
- All domain tool handlers MUST catch internal exceptions and return structured dictionary responses (`{"error": "...", "status": "failed"}`) rather than raising unhandled exceptions into the LangGraph loop.
- Never catch raw `Exception` silently with `pass`. Log every unexpected error with appropriate context:
```python
try:
...
except Exception as e:
logger.warning(f"[{module_name}] Operation failed non-fatally: {e}")
return {"error": str(e), "status": "failed"}
```
## 5. Clean Imports & Anti-Bloat
- Avoid circular imports by importing type annotations under `if TYPE_CHECKING:` guards or importing domain handlers lazily inside tool execution methods.
- Standard Library First: Prefer `dataclasses`, `functools`, `typing`, `asyncio`, `re`, `json`, `datetime` over heavy third-party utility packages.From alakbarr/Monika, MIT.
More from alakbarr/Monika
- 0.561score
os-terminal-automation
alakbarr
Universal Terminal & Process Execution Playbook: Controlled shell execution, process monitoring, background task supervision, and operator safety gating.
SkillAFreshness: AClaude Code +9 - 0.561score
database-analytics-and-reporting
alakbarr
Direct SQL & Analytical Query Playbook: Schema inspection, safe read-only SQL queries, performance joins, debate transcript exports, and custom metric…
SkillAFreshness: AClaude Code +9 - 0.561score
desktop-gui-computer-use
alakbarr
Desktop GUI Interaction & Computer Use Playbook: Screen inspection, MetaTrader 5 window snapping, mouse click automation, and keystroke dispatching.
SkillAFreshness: AClaude Code +9 - 0.558score
web-research-fallback
alakbarr
Web research cascade: API, RSS, WebSearch, DrissionPage browser, and PDF parsing.
SkillAFreshness: AClaude Code +9 - 0.558score
academic-literature
alakbarr
Synthesize mathematical formulations and alpha mechanics from quantitative papers.
SkillAFreshness: AClaude Code +9 - 0.558score
codebase-inspection
alakbarr
Monika codebase structure auditing, module navigation, and invariant verification.
SkillAFreshness: AClaude Code +9 - 0.558score
data-science-modeling
alakbarr
Vectorized data processing, TimesFM time-series forecasting, and statistical modeling.
SkillAFreshness: AClaude Code +9 - 0.558score
devops-automation
alakbarr
Monika daemon supervision, Docker VPS deployment, and graceful process management.
SkillAFreshness: AClaude Code +9 - 0.558score
financial-research
alakbarr
Cross-asset research, prediction market analysis, derivatives positioning, and sentiment distillation.
SkillAFreshness: AClaude Code +9 - 0.558score
institutional-document-reporting
alakbarr
Institutional document and pitch deck generation (Word .docx, PowerPoint .pptx, Excel .xlsx, PDF tearsheets).
SkillAFreshness: AClaude Code +9 - 0.558score
adjudication-framework
alakbarr
Stage 2 synthesis adjudication rules for specialist conflict resolution.
SkillAFreshness: AClaude Code +9 - 0.558score
quant-math-verification
alakbarr
Institutional quantitative mathematics, formula verification, and statistical edge calculation standards.
SkillAFreshness: AClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Oct 12, 2026 (24 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/alakbarr/Monika
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from alakbarr
- 0.561score
os-terminal-automation
alakbarr
Universal Terminal & Process Execution Playbook: Controlled shell execution, process monitoring, background task supervision, and operator safety gating.
SkillAFreshness: AClaude Code +9 - 0.561score
desktop-gui-computer-use
alakbarr
Desktop GUI Interaction & Computer Use Playbook: Screen inspection, MetaTrader 5 window snapping, mouse click automation, and keystroke dispatching.
SkillAFreshness: AClaude Code +9 - 0.561score
database-analytics-and-reporting
alakbarr
Direct SQL & Analytical Query Playbook: Schema inspection, safe read-only SQL queries, performance joins, debate transcript exports, and custom metric…
SkillAFreshness: AClaude Code +9 - 0.558score
systematic-debugging
alakbarr
Scientific root-cause analysis, log inspection, and defect remediation for Monika.
SkillAFreshness: AClaude Code +9 - 0.558score
academic-literature
alakbarr
Synthesize mathematical formulations and alpha mechanics from quantitative papers.
SkillAFreshness: AClaude Code +9 - 0.558score
quant-math-verification
alakbarr
Institutional quantitative mathematics, formula verification, and statistical edge calculation standards.
SkillAFreshness: AClaude Code +9
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get code-optimization running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
code-optimization skill. Agent Mart. https://agentmart.dev/skills/alakbarr-code-optimization (last updated 2026-10-24)