mindfulness
About
This skill provides developers with defensive situational awareness and threat assessment techniques for high-pressure scenarios. It includes tools like the Cooper color code system, OODA loop, and verbal de-escalation for evaluating safety and maintaining mental clarity. Use it when entering unfamiliar environments, assessing potential threats, or needing to de-escalate confrontations.
Quick Install
Claude Code
Recommendednpx skills add pjt222/agent-almanac -a claude-code/plugin add https://github.com/pjt222/agent-almanacgit clone https://github.com/pjt222/agent-almanac.git ~/.claude/skills/mindfulnessCopy and paste this command in Claude Code to install this skill
Documentation
Cultivate Defensive Mindfulness
Develop applied situational awareness, de-escalation skill, and the ability to maintain mental clarity under threat — a practical complement to seated meditation that operates in dynamic, real-world environments.
When to Use
- Entering unfamiliar or potentially hostile environments
- Needing to assess a social or physical situation for safety
- De-escalating a verbal confrontation before it becomes physical
- Maintaining calm focus during a high-pressure or dangerous event
- Grounding rapidly after a shock, surprise, or adrenaline dump
- Integrating awareness practice into daily movement (walking, commuting, traveling)
- Preparing the mental component before martial arts training (see
tai-chi,aikido)
Inputs
- Required: A willingness to practice sustained outward attention (this is the opposite of internal meditation)
- Required: Access to public or semi-public environments for practice (streets, transit, events)
- Optional: Prior meditation experience (see
meditate; helpful but not required) - Optional: Martial arts training background (see
tai-chi,aikido; enhances physical response options) - Optional: Practice partner for de-escalation role-play scenarios
Procedure
Step 1: Assess Situational Awareness (Cooper Color Codes)
The Cooper color code system provides a framework for calibrating awareness level to the environment.
Cooper Color Code Awareness Levels:
┌──────────┬─────────────────────┬──────────────────────────────────────────┐
│ Code │ State │ Description and Application │
├──────────┼─────────────────────┼──────────────────────────────────────────┤
│ White │ Unaware │ Absorbed in phone, headphones, day- │
│ │ │ dreaming. No awareness of surroundings. │
│ │ │ Acceptable only in secured private space │
├──────────┼─────────────────────┼──────────────────────────────────────────┤
│ Yellow │ Relaxed alert │ Aware of surroundings without fixation. │
│ │ │ Scanning people, exits, anomalies. This │
│ │ │ is the DEFAULT state in public spaces │
├──────────┼─────────────────────┼──────────────────────────────────────────┤
│ Orange │ Specific alert │ Something has triggered attention: a │
│ │ │ person, behavior, or situation. Forming │
│ │ │ a plan: "If X happens, I will do Y" │
├──────────┼─────────────────────┼──────────────────────────────────────────┤
│ Red │ Action │ The trigger condition from Orange has │
│ │ │ occurred. Execute the pre-formed plan. │
│ │ │ No hesitation — decision was made in │
│ │ │ Orange │
├──────────┼─────────────────────┼──────────────────────────────────────────┤
│ Black │ Overwhelmed │ Panic, freeze, tunnel vision. Caused by │
│ │ │ jumping from White directly to Red with │
│ │ │ no mental preparation. AVOID this state │
└──────────┴─────────────────────┴──────────────────────────────────────────┘
Practice protocol:
- When leaving your home, consciously shift from White to Yellow
- In Yellow, scan: Who is around? Where are the exits? What is baseline behavior here?
- When something draws attention, shift to Orange: identify the specific concern and form a contingency
- If the concern resolves, return to Yellow — do not stay in Orange unnecessarily (it drains energy)
- Practice the White-to-Yellow transition until it becomes automatic (2-4 weeks of daily practice)
Got: After consistent practice, Yellow becomes the natural default in public spaces. Anomalies register immediately without conscious searching. Exits and positioning become habitual considerations.
If fail: If Yellow feels exhausting or paranoid, the attention is too focused. Yellow is relaxed and wide — like peripheral vision, not a spotlight. If you find yourself constantly in Orange, you may be over-calibrating threat. Practice in safe, familiar environments first to establish a baseline "Yellow" that feels sustainable and calm.
Step 2: Read Body Language and Intent
Most threats broadcast intention through body language before they act. Learn to read pre-attack indicators.
- Baseline observation: In any new environment, note what normal behavior looks like — pace, posture, eye contact patterns, group dynamics
- Deviation detection: Flag behaviors that deviate from baseline:
- Someone scanning the crowd while standing still (target selection)
- Clenched fists, squared shoulders, bladed stance (pre-fight posturing)
- Avoiding eye contact while closing distance (predatory approach)
- Exaggerated calm or unnatural stillness in a dynamic environment
- Eye patterns: Direct, locked eye contact from a stranger can indicate challenge or predatory focus. Repeated glancing at you, then away, may indicate surveillance or target assessment
- Proxemics (distance): People who close distance without social reason (not in a queue, not passing through) warrant attention. Trust the instinct that says "that person is too close"
- Group dynamics: Watch for one person holding attention (distraction) while another maneuvers (setup). Pre-arranged signals between members of a group (nods, gestures)
- Gut response: The limbic system processes threat faster than the conscious mind. If something feels wrong, honor that signal and increase awareness before rationalizing it away
Got: The ability to notice pre-attack indicators in real time and shift from Yellow to Orange with a specific concern identified. A general sense of when someone's behavior does not match the social context.
If fail: If body language reading feels like guesswork, practice in safe environments first: observe interactions at a cafe, on public transit, or in a park. Note postures, distances, and energy levels without any threat component. Reading people is a skill built through volume of observation. If you become hypervigilant (seeing threats everywhere), ground yourself with Step 6 techniques and recalibrate with the reminder that most people are not threats.
Step 3: De-escalate Verbal Confrontation
When a situation escalates verbally, de-escalation is the highest-value skill. Most violence can be prevented with words and positioning.
De-escalation Framework:
┌──────────────────┬──────────────────────────────────────────────────────┐
│ Phase │ Technique │
├──────────────────┼──────────────────────────────────────────────────────┤
│ 1. Space │ Maintain 2+ arm-lengths distance. Angle your body │
│ │ 45 degrees (non-confrontational, protects center │
│ │ line). Position an exit route behind you, never │
│ │ behind the aggressor │
├──────────────────┼──────────────────────────────────────────────────────┤
│ 2. Voice │ Lower your volume below theirs — this forces them │
│ │ to quiet down to hear you. Speak slowly. Use a │
│ │ calm, even tone. Avoid commands ("calm down") — │
│ │ use observations ("I can see you're upset") │
├──────────────────┼──────────────────────────────────────────────────────┤
│ 3. Acknowledge │ Name their emotion without agreeing with their │
│ │ position: "That sounds really frustrating." Do NOT │
│ │ say "I understand" unless you genuinely do. Do NOT │
│ │ argue, correct, or explain — yet │
├──────────────────┼──────────────────────────────────────────────────────┤
│ 4. Offer exits │ Give the person a way to disengage without losing │
│ │ face: "I think we both need a minute" or "Let me │
│ │ get someone who can help with this." Frame retreat │
│ │ as a mutual decision, not submission │
├──────────────────┼──────────────────────────────────────────────────────┤
│ 5. Disengage │ If de-escalation fails, create distance. Do not │
│ │ turn your back. Move toward other people, exits, │
│ │ or authority figures. Leave the area if possible │
└──────────────────┴──────────────────────────────────────────────────────┘
Critical rules:
- Never tell an angry person to "calm down" — this escalates
- Hands visible and open (non-threatening) but positioned to protect (fence position)
- Do not match their energy: if they escalate, you de-escalate harder
- An ego-driven need to "win" the argument is the most common cause of avoidable violence
Got: The ability to lower the emotional temperature of a confrontation through voice, positioning, and verbal technique. Most verbal confrontations de-escalate within 60-90 seconds of effective technique.
If fail: If the person becomes physically threatening despite de-escalation, the priority shifts from de-escalation to escape or, if escape is impossible, to physical defense (see aikido, tai-chi). Not every situation can be talked down. Recognize when de-escalation has failed and transition to action without hesitation.
Step 4: Practice Moving Mindfulness
Moving mindfulness applies meditation awareness to walking, commuting, and navigating public spaces.
- When walking, practice panoramic awareness: soften the eyes and take in the full visual field rather than focusing on one point
- Feel the ground contact with each step — this anchors awareness in the body while the eyes scan the environment
- Maintain awareness of the space behind you: changes in sound (footsteps speeding up, conversation stopping) carry information
- At transitions (entering a building, rounding a corner, stepping off transit), pause briefly and scan the new environment before committing
- In crowded spaces, track 2-3 people in your peripheral awareness without fixating on any one
- Practice "mirroring walk": match the pace and rhythm of the environment to blend in; deliberately vary your pace to test whether anyone matches your changes
- Periodically check: "If something happened right now, where would I go?" This is Yellow-state maintenance
Got: Walking becomes an active awareness practice rather than passive transportation. Transitions (doorways, corners, platform edges) become natural scan points. Environmental baseline is maintained without effort.
If fail: If moving mindfulness feels tiring or distracting, you are likely gripping too tightly. The awareness should feel like listening to background music — present but not demanding. If you cannot maintain it while also thinking or conversing, practice in simple environments first (quiet neighborhood walk) before adding complexity (busy street, transit).
Step 5: Cultivate Combat Mindfulness (OODA Loop)
The OODA loop (Observe-Orient-Decide-Act) is a decision cycle for operating under pressure. Speed through this loop determines who controls an encounter.
OODA Loop Application:
┌──────────┬──────────────────────────────────────────────────────────────┐
│ Phase │ Application │
├──────────┼──────────────────────────────────────────────────────────────┤
│ Observe │ Take in the full situation: who, what, where, how many, │
│ │ weapons, exits, bystanders. Use peripheral vision. Do not │
│ │ fixate on the most obvious stimulus — scan the whole scene │
├──────────┼──────────────────────────────────────────────────────────────┤
│ Orient │ Match the observation to your training and experience: │
│ │ "This is [type of situation]. I have [these options]." │
│ │ Orientation is where pre-training pays off — trained │
│ │ responses orient faster than improvised ones │
├──────────┼──────────────────────────────────────────────────────────────┤
│ Decide │ Select the best available option — not the perfect one. │
│ │ A good decision now beats a perfect decision too late. │
│ │ If Orange-state planning was done (Step 1), the decision │
│ │ may already be made │
├──────────┼──────────────────────────────────────────────────────────────┤
│ Act │ Execute with full commitment. Hesitation between decision │
│ │ and action is the most dangerous gap. Once you act, observe │
│ │ the result and re-enter the loop │
└──────────┴──────────────────────────────────────────────────────────────┘
Training the OODA loop:
- In daily life, practice rapid scenario assessment: enter a room and within 5 seconds identify exits, cover, and the most concerning person
- Play "what if" games: "If someone entered that door aggressively right now, what would I do?" Form the plan (Orange), then release (return to Yellow)
- In martial arts practice, train pre-set responses to specific attacks — this accelerates the Orient phase
- Practice decision-making under artificial stress: timed drills, cold water exposure while problem-solving, physical exercise combined with cognitive tasks
- After any real or simulated event, debrief: "What did I observe? What did I miss? Where did I hesitate?"
Got: The OODA loop becomes increasingly automatic. Observation is broad and rapid. Orientation draws on trained patterns. Decisions are made in Orange so that Red-state action is immediate.
If fail: If you freeze under simulated pressure (the Black state), the stimulus has bypassed your OODA loop. The gap between White and Red was too large. Return to Step 1 and reinforce Yellow-state maintenance so unexpected events meet an already-alert mind. Freezing is a normal survival response — it can be retrained through gradual stress inoculation, not by forcing yourself into extreme scenarios.
Step 6: Deploy Rapid Grounding Techniques
When stress, shock, or adrenaline disrupts clarity, these techniques restore functional awareness within seconds.
Grounding Techniques Quick Reference:
┌──────────────────────┬─────────────────────────────────────────────────┐
│ Technique │ Method and Use Case │
├──────────────────────┼─────────────────────────────────────────────────┤
│ Tactical breathing │ Inhale 4 counts, hold 4, exhale 4, hold 4. │
│ (box breathing) │ Repeat 4 cycles. Activates parasympathetic │
│ │ response in ~60 seconds. Use: acute stress, │
│ │ pre-confrontation, post-adrenaline dump │
├──────────────────────┼─────────────────────────────────────────────────┤
│ 5-4-3-2-1 sensory │ Name 5 things you see, 4 you hear, 3 you can │
│ anchor │ touch, 2 you smell, 1 you taste. Forces the │
│ │ mind out of internal panic and into present- │
│ │ moment external reality. Use: dissociation, │
│ │ freeze response, post-traumatic intrusion │
├──────────────────────┼─────────────────────────────────────────────────┤
│ Peripheral vision │ Fix eyes on a point, then widen awareness to │
│ activation │ the edges of the visual field without moving │
│ │ the eyes. Activates parasympathetic nervous │
│ │ system and reduces tunnel vision. Use: hyper- │
│ │ focus, tunnel vision, adrenaline narrowing │
├──────────────────────┼─────────────────────────────────────────────────┤
│ Physical anchor │ Press feet firmly into the ground and feel the │
│ │ contact. Squeeze and release fists 3 times. │
│ │ Roll shoulders back. These physical actions │
│ │ re-establish body awareness. Use: dissociation,│
│ │ shaking, post-event processing │
├──────────────────────┼─────────────────────────────────────────────────┤
│ Verbal reset │ State your name, location, and current task │
│ │ aloud: "I am [name], I am at [location], I am │
│ │ doing [task]." Orienting to facts breaks the │
│ │ emotional loop. Use: confusion, panic, sensory │
│ │ overload │
└──────────────────────┴─────────────────────────────────────────────────┘
- Practice these techniques when NOT under stress so they are available when needed
- Tactical breathing is the single most effective rapid intervention — practice it daily
- After any adrenaline event (near-miss, confrontation, shock), run box breathing before making any decisions
- Combine techniques: physical anchor + tactical breathing is effective for strong reactions
Got: The ability to downregulate from acute stress to functional clarity within 60-120 seconds. Techniques are practiced enough to be recalled under pressure without conscious effort.
If fail: If a technique does not bring relief within 2 minutes, switch to a different one — not all techniques work for all people or all situations. If grounding is ineffective because the stressor is ongoing (you are still in danger), grounding is premature — address the situation first using OODA (Step 5), then ground afterward. Persistent inability to downregulate after events may indicate a need for professional support.
Step 7: Integrate Across Contexts
Apply defensive mindfulness consistently across different environments and situations.
- Urban: Higher baseline alertness (solid Yellow). Track blind spots (alleys, stairwells, parking structures). Maintain awareness at ATMs, transit platforms, and when entering/exiting vehicles
- Wilderness: Different threat profile — terrain hazards, weather, wildlife, getting lost. Awareness shifts from people to environment. Navigation and shelter assessment replace social threat reading (see bushcraft skills)
- Social events: Identify exits on arrival. Monitor alcohol levels in others (impaired people are unpredictable). Stay closer to exits than to the center of crowds
- Travel: Heightened awareness in unfamiliar environments. Know the emergency number for the country. Keep documents and valuables distributed, not in one bag. Note your route to/from accommodation
- Digital: Awareness extends to information security — who is observing your device, what you share publicly, physical security of your devices
- With others: Your awareness protects the people with you. Position yourself between potential threats and those you are with. Brief companions on basic awareness without causing anxiety
Got: A consistent, sustainable baseline awareness that adapts to context without becoming paranoid or exhausting. Yellow state maintained across environments with appropriate Orange-state responses to genuine anomalies.
If fail: If awareness practice creates anxiety or hypervigilance, the calibration is too high. Return to Step 1 and practice Yellow in familiar, safe environments. The goal is relaxed alertness, not perpetual threat scanning. If awareness practice interferes with enjoyment of life, consult with a mental health professional — particularly if there is a trauma history that makes threat assessment unreliable.
Step 8: Review and Refine
Like any skill, defensive mindfulness improves through deliberate review and honest self-assessment.
- After any notable awareness event (a successful detection, a de-escalation, a missed cue, a freeze), journal the details:
- What happened?
- What color code was I in when it started?
- What did I observe? What did I miss?
- What worked? What would I do differently?
- Monthly review: scan journal entries for patterns — recurring blind spots, environments where awareness drops, emotional states that interfere
- Seek training: de-escalation workshops, scenario-based self-defense courses, first aid certification
- Practice with a partner: role-play confrontation scenarios, practice verbal de-escalation, critique each other's positioning
- Cross-train: martial arts (see
aikido,tai-chi) build physical response options; meditation (seemeditate) builds the calm baseline that awareness operates from - Maintain physical fitness: the body's stress response performs better when the cardiovascular system is conditioned
Got: Measurable improvement over time: faster anomaly detection, calmer response to stressors, better positioning habits, and more effective de-escalation.
If fail: If skills plateau, introduce novel environments or training partners. If motivation wanes, recall that awareness is an investment that pays off in the one moment it is needed. If self-assessment reveals persistent weaknesses (e.g., always freezing, never noticing approaches from behind), target those specifically rather than continuing general practice.
Validation
- Cooper color codes can be identified and applied in real time
- At least 3 pre-attack body language indicators can be named and recognized
- De-escalation framework can be articulated and has been practiced (at minimum in role-play)
- Moving mindfulness is practiced during daily commute or walking for at least 1 week
- Tactical breathing (box breathing) can be performed from memory and has been practiced daily
- At least 2 rapid grounding techniques have been tested and one preferred method identified
- OODA loop has been applied to at least 3 "what if" scenarios
- Awareness journal has at least 3 entries documenting real observations
Pitfalls
- Hypervigilance masquerading as awareness: True awareness is relaxed and sustainable. If you are exhausted, anxious, or seeing threats everywhere, you are in chronic Orange — counterproductive and unsustainable. Yellow is the goal, not Orange
- Tunnel vision on the obvious threat: The person yelling may be the distraction. Train yourself to scan the periphery when something grabs central attention. Multiple-threat awareness is the purpose of randori training (see
aikido) - Telling an angry person to calm down: This is the single most common de-escalation error. It communicates that their feelings are invalid and you are in control — both escalatory. Acknowledge their emotional state instead
- Neglecting the verbal before the physical: Most violence is preceded by verbal escalation. Effective de-escalation prevents the vast majority of physical confrontations. Investing in verbal skills has higher return than physical technique alone
- Skipping grounding after events: Adrenaline impairs judgment for 20-45 minutes after an event. Making decisions (especially aggressive ones) during this window is unreliable. Ground first, decide second
- Training in isolation: Awareness and de-escalation are social skills. Solo practice builds the foundation, but partner drills and real-world practice are essential for realistic competence
Related Skills
aikido— physical techniques for when de-escalation fails; blending and redirection principles mirror verbal de-escalationtai-chi— develops rooted calm and body awareness that supports both physical readiness and emotional regulationmeditate— builds the baseline mental stillness from which awareness operates; seated practice complements the active, outward focus of defensive mindfulnessheal— first aid knowledge and stress management are direct applications of defensive mindfulnessremote-viewing— shares perceptual acuity training; non-local awareness exercises complement environmental scanning skillsawareness— AI self-application variant; maps Cooper color codes and OODA loop to internal threat detection for hallucination risk and context degradation
GitHub Repository
Related Skills
content-collections
MetaThis skill provides a production-tested setup for Content Collections, a TypeScript-first tool that transforms Markdown/MDX files into type-safe data collections with Zod validation. Use it when building blogs, documentation sites, or content-heavy Vite + React applications to ensure type safety and automatic content validation. It covers everything from Vite plugin configuration and MDX compilation to deployment optimization and schema validation.
polymarket
MetaThis skill enables developers to build applications with the Polymarket prediction markets platform, including API integration for trading and market data. It also provides real-time data streaming via WebSocket to monitor live trades and market activity. Use it for implementing trading strategies or creating tools that process live market updates.
creating-opencode-plugins
MetaThis skill helps developers create OpenCode plugins that hook into 25+ event types like commands, files, and LSP operations. It provides the plugin structure, event API specifications, and implementation patterns for JavaScript/TypeScript modules. Use it when you need to intercept, monitor, or extend the OpenCode AI assistant's lifecycle with custom event-driven logic.
sglang
MetaSGLang is a high-performance LLM serving framework that specializes in fast, structured generation for JSON, regex, and agentic workflows using its RadixAttention prefix caching. It delivers significantly faster inference, especially for tasks with repeated prefixes, making it ideal for complex, structured outputs and multi-turn conversations. Choose SGLang over alternatives like vLLM when you need constrained decoding or are building applications with extensive prefix sharing.
