
Security News
White House Authorizes Private Companies to Conduct Offensive Cyber Operations
A new federal program will let vetted U.S. cybersecurity firms help investigate and disrupt foreign cybercrime groups under government direction.
@codmir/ai-instructions
Advanced tools
Centralized AI instructions, prompts, and gibber link mode for AI-to-AI communication
Centralized AI instructions, prompts, and Gibber Link mode for AI-to-AI communication.
pnpm add @codmir/ai-instructions
For Gibber Link audio features, include ggwave in your HTML:
<script src="https://unpkg.com/ggwave@0.4.0/build/ggwave.js"></script>
import { buildPrompt, buildVoicePrompt, getEnglishEnforcement } from '@codmir/ai-instructions'
// Build a prompt with all applicable instructions
const result = buildPrompt('You are a helpful assistant.', {
mode: 'voice',
participantCount: 2,
isAIToAI: false,
})
console.log(result.systemPrompt)
// Includes: English enforcement, human communication rules, voice style, etc.
import { buildDuoModePrompt } from '@codmir/ai-instructions'
const result = buildDuoModePrompt('You are an AI assistant collaborating with another AI.')
// Includes duo mode collaboration instructions
Gibber Link enables AI-to-AI communication via audio-encoded data transmission.
import { createGibberLink } from '@codmir/ai-instructions/gibberlink'
const gibberLink = createGibberLink({
protocol: 'audible_fast',
autoDetect: true,
})
// Start listening for messages
await gibberLink.startListening()
// Register message handler
gibberLink.onMessage((message) => {
console.log('Received:', message.data)
})
// Send a message (encoded as audio)
await gibberLink.sendMessage('Hello from AI-1')
import { useGibberLink, useAIInstructions, useDuoModeDetection } from '@codmir/ai-instructions/react'
function VoiceRoom() {
// Gibber Link for AI-to-AI audio communication
const { isReady, startListening, sendMessage } = useGibberLink({
onMessage: (msg) => console.log('Received:', msg.data),
})
// Build prompts with context
const { buildForVoice, buildForDuoMode } = useAIInstructions()
// Detect when AIs are talking to each other
const { state, trackMessage } = useDuoModeDetection({
aiParticipantIds: ['ai-1', 'ai-2'],
gibberLinkThreshold: 3,
onDuoModeDetected: (state) => {
if (state.shouldSuggestGibberLink) {
// Show UI to enable gibber link
}
},
})
return (
<div>
{state.isDuoMode && <p>Duo mode active: {state.activeAICount} AIs</p>}
{state.shouldSuggestGibberLink && (
<button onClick={startListening}>Enable Gibber Link</button>
)}
</div>
)
}
| ID | Category | Priority | Description |
|---|---|---|---|
english-enforcement | language | critical | Forces English-only responses |
human-communication | communication | high | Natural human speech rules |
voice-conversation | communication | high | Voice conversation style |
duo-mode-base | duo_mode | high | AI-to-AI collaboration |
duo-mode-tasks | duo_mode | medium | Task collaboration |
voice-progress | communication | medium | Voice progress reporting |
gibber-link-mode | communication | high | Audio-encoded communication |
safety-guidelines | safety | critical | Safety boundaries |
Gibber Link uses ggwave for audio-based data transmission:
| Protocol | Speed | Audibility |
|---|---|---|
audible_fastest | Fastest | Most audible |
audible_fast | Fast | Audible |
audible_normal | Normal | Audible |
ultrasound | Normal | Inaudible to humans |
buildPrompt(basePrompt, context)Build a system prompt with applicable instructions.
buildDuoModePrompt(basePrompt, context)Build a prompt for AI-to-AI collaboration.
buildGibberLinkPrompt(basePrompt, context)Build a prompt for Gibber Link mode.
createGibberLink(config)Create a GibberLink service for audio-based communication.
useGibberLink(options)React hook for Gibber Link.
useDuoModeDetection(options)React hook to detect AI-to-AI communication patterns.
# Enable gibber link mode globally
AI_LINK_MODE_ENABLED=true
# Allow users to toggle
AI_LINK_MODE_USER_CONTROL=true
MIT
FAQs
Centralized AI instructions, prompts, and gibber link mode for AI-to-AI communication
The npm package @codmir/ai-instructions receives a total of 0 weekly downloads. As such, @codmir/ai-instructions popularity was classified as not popular.
We found that @codmir/ai-instructions demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
A new federal program will let vetted U.S. cybersecurity firms help investigate and disrupt foreign cybercrime groups under government direction.

Research
/Security News
The campaign amassed more than 75,000 installs by targeting Russian-speaking users seeking access to blocked services.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.