Skip to content

Instantly share code, notes, and snippets.

View marceloavf's full-sized avatar
🪐
Sic Parvis Magna

Marcelo Formentão marceloavf

🪐
Sic Parvis Magna
View GitHub Profile
name orchestrate-background-sessions
description Run a multi-step task as a coordinator that starts one background Claude Code session (`claude --bg`) for each unit of work, in place of subagents. Use when the user asks for an orchestrating session, a coordinator, or background sessions/threads for a plan with several steps, issues, or pull requests.

Orchestrate background sessions

You are the coordinator. You do not do the units of work yourself. For each unit, you start one background session, wait for its report, verify its result, integrate it, record it, and start the next unit.

Use a background session in place of a subagent because it has its own context window with its own compaction, its own git worktree, and its own model and effort. It also continues when your context is compacted.

@aashari
aashari / 00-core-prompt
Last active September 29, 2026 04:41
Prompting Guide
# Principal Software Engineer Operating Guidelines
**Version**: 5.2
**Last Updated**: 2025-11-15
You're operating as a principal engineer with full access to this machine. Think of yourself as someone who's been trusted with root access and the autonomy to get things done efficiently and correctly.
**Principal Engineer Mindset:**
- **Deep Context Gathering** - Curious about everything. Gather comprehensive context before acting. Understand the full system, not just your immediate task.
- **Architectural Thinking** - Design systems that scale. Make decisions considering long-term implications, maintainability, and system-wide impact.
@aashari
aashari / 00 - Cursor AI Prompting Rules.md
Last active October 16, 2026 20:13
Cursor AI Prompting Rules - This gist provides structured prompting rules for optimizing Cursor AI interactions. It includes three key files to streamline AI behavior for different tasks.

The Autonomous Agent Prompting Framework

This repository contains a disciplined, evidence-first prompting framework designed to elevate an Agentic AI from a simple command executor to an Autonomous Principal Engineer.

The philosophy is simple: Autonomy through discipline. Trust through verification.

This framework is not just a collection of prompts; it is a complete operational system for managing AI agents. It enforces a rigorous workflow of reconnaissance, planning, safe execution, and self-improvement, ensuring every action the agent takes is deliberate, verifiable, and aligned with senior engineering best practices.

I also have Claude Code prompting for your reference: https://gist.github.com/aashari/1c38e8c7766b5ba81c3a0d4d124a2f58

@sindresorhus
sindresorhus / esm-package.md
Last active October 28, 2026 00:11
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
declare type NonNullablePropertyNames <T extends Object> =
{ [K in keyof T]: T[K] extends null | undefined ? never : K }[keyof T];
declare type Merge <T extends Object, U extends Object> =
Pick<T, Exclude<keyof T, keyof U>> & Pick<U, NonNullablePropertyNames<U>>;
@ebidel
ebidel / coverage.js
Last active October 18, 2025 09:48
CSS/JS code coverage during lifecycle of page load
Moved to https://github.com/ebidel/puppeteer-examples
@eolant
eolant / Confirm.vue
Last active December 19, 2025 06:34
Vuetify Confirm Dialog component that can be used locally or globally
<template>
<v-dialog v-model="dialog" :max-width="options.width" :style="{ zIndex: options.zIndex }" @keydown.esc="cancel">
<v-card>
<v-toolbar dark :color="options.color" dense flat>
<v-toolbar-title class="white--text">{{ title }}</v-toolbar-title>
</v-toolbar>
<v-card-text v-show="!!message" class="pa-4">{{ message }}</v-card-text>
<v-card-actions class="pt-0">
<v-spacer></v-spacer>
<v-btn color="primary darken-1" text @click.native="agree">Yes</v-btn>
@rdeavila
rdeavila / git-update-fork.sh
Last active November 2, 2026 17:51
Git: como atualizar um fork com as mudanças do original?
#!/bin/bash
# Adicione um novo remote; pode chamá-lo de "upstream":
git remote add upstream https://github.com/usuario/projeto.git
# Obtenha todos os branches deste novo remote,
# como o upstream/master por exemplo:
git fetch upstream
IMPORTANT
Please duplicate this radar for a Safari fix!
This will clean up a 50-line workaround.
rdar://22376037 (https://openradar.appspot.com/radar?id=4965070979203072)
//////////////////////////////////////////////////////////////////////////////
(Now available as a standalone repo.)