ci-cd-and-automation
यह क्या करती है
यह सिस्टम आपके कोड की जांच करने वाली प्रक्रियाओं का सेटअप अपने आप करता है। यह सुनिश्चित करता है कि अंतिम प्रोडक्ट तक सिर्फ अच्छा कोड पहुंचे, क्योंकि हर चीज़ पहले टेस्ट होती है।
कब इस्तेमाल करें
- ✓नया प्रोजेक्ट शुरू करते समय उसकी जांच की व्यवस्था बनाने के लिए।
- ✓ऑटोमैटिक टेस्ट जोड़ने या बदलने के लिए।
- ✓कोड को इस्तेमाल के लिए जारी करने (release) का तरीका सेट करने के लिए।
Skill का लिंक
https://github.com/addyosmani/agent-skills/blob/main/skills/ci-cd-and-automation/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मेरे प्रोजेक्ट के लिए ऑटोमेटेड टेस्टिंग पाइपलाइन सेट करो।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
यह जांचों की एक श्रृंखला तय करता है (जैसे कोड, फ़ंक्शनैलिटी और सुरक्षा के टेस्ट), जिन्हें पास करने के बाद ही कोड तैयार माना जाता है। कोई जांच फेल हो जाए, तो सिस्टम आपको सुधार के लिए सूचना देता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
CI/CD and Automation
Overview
Automate quality gates so that no change reaches production without passing tests, lint, type checking, and build. CI/CD is the enforcement mechanism for every other skill — it catches what humans and agents miss, and it does so consistently on every single change.
Shift Left: Catch problems as early in the pipeline as possible. A bug caught in linting costs minutes; the same bug caught in production costs hours. Move checks upstream — static analysis before tests, tests before staging, staging before production.
Faster is Safer: Smaller batches and more frequent releases reduce risk, not increase it. A deployment with 3 changes is easier to debug than one with 30. Frequent releases build confidence in the release process itself.
When to Use
- Setting up a new project's CI pipeline
- Adding or modifying automated checks
- Configuring deployment pipelines
- When a change should trigger automated verification
- Debugging CI failures
The Quality Gate Pipeline
Every change goes through these gates before merge:
Pull Request Opened
│
▼
┌─────────────────┐
│ LINT CHECK │ eslint, prettier
│ ↓ pass │
│ TYPE CHECK │ tsc --noEmit
│ ↓ pass │
│ UNIT TESTS │ jest/vitest
│ ↓ pass │
│ BUILD │ npm run build
│ ↓ pass │
│ INTEGRATION │ API/DB tests
│ ↓ pass │
│ E2E (optional) │ Playwright/Cypress
│ ↓ pass │
│ SECURITY AUDIT │ npm audit
│ ↓ pass │
│ BUNDLE SIZE │ bundlesize check
└─────────────────┘
│
▼
Ready for review
No gate can be skipped. If lint fails, fix lint — don't disable the rule. If a test fails, fix the code — don't skip the test.
GitHub Actions Configuration
Basic CI Pipeline
# .github/workflows/ci.yml
name: CI
on:
pull_request:
branches: [main]
push:
branches: [main]
jobs:
quality:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Lint
run: npm run lint
- name: Type check
run: npx tsc --noEmit
- name: Test
run: npm test -- --coverage
- name: Build
run: npm run build
- name: Security audit
run: npm audit --audit-level=high
With Database Integration Tests
integration:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16
env:
POSTGRES_DB: testdb
POSTGRES_USER: ci_user
POSTGRES_PASSWORD: ${{ secrets.CI_DB_PASSWORD }}
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
- run: npm ci
- name: Run migrations
run: npx prisma migrate deploy
env:
DATABASE_URL: postgresql://ci_user:${{ secrets.CI_DB_PASSWORD }}@localhost:5432/testdb
- name: Integration tests
run: npm run test:integration
env:
DATABASE_URL: postgresql://ci_user:${{ secrets.CI_DB_PASSWORD }}@localhost:5432/testdb
Note: Even for CI-only test databases, use GitHub Secrets for credentials rather than hardcoding values. This builds good habits and prevents accidental reuse of test credentials in other contexts.
E2E Tests
e2e:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
- run: npm ci
- name: Install Playwright
run: npx playwright install --with-deps chromium
- name: Build
run: npm run build
- name: Run E2E tests
run: npx playwright test
- uses: actions/upload-artifact@v4
if: failure()
with:
name: playwright-report
path: playwright-report/
Feeding CI Failures Back to Agents
The power of CI with AI agents is the feedback loop. When CI fails:
CI fails
│
▼
Copy the failure output
│
▼
Feed it to the agent:
"The CI pipeline failed with this error:
[paste specific error]
…
अक्सर पूछे जाने वाले सवाल
'quality gates' क्या हैं?
ये क्वालिटी की रुकावटें या दरवाज़े हैं। हर 'गेट' एक जांच है, जिसे पास किए बिना कोड आगे नहीं बढ़ सकता, जैसे कोड या फ़ंक्शनैलिटी के टेस्ट।
'faster safer' क्यों कहा जाता है?
बार-बार छोटे बदलाव जारी करना ज़्यादा सुरक्षित है। छोटे अपडेट में कोई समस्या ढूंढकर ठीक करना बड़े अपडेट की तुलना में आसान होता है, जिससे जोखिम घटता है।
'Shift Left' क्या है?
इसका मतलब है प्रक्रिया में समस्याओं को जितना हो सके जल्दी ढूंढना। किसी गलती को शुरू में ठीक करने में कम समय और मेहनत लगती है, बजाय इसके कि प्रोडक्ट बन जाने या इस्तेमाल होने के बाद ठीक करें।
जानकारी
लेखक का मूल विवरण
Automates CI/CD pipeline setup. Use when setting up or modifying build and deployment pipelines. Use when you need to automate quality gates, configure test runners in CI, or establish deployment strategies.
repo: addyosmani/agent-skills
लोकप्रियता
- GitHub स्टार
- 107k
- रैंकिंग में स्थान
- #763
- लाइसेंस
- MIT
- अपडेट की गई
- 13/10/2026
कमेंट
- …
इस repository की और skills
api-and-interface-design
107kअच्छी तरह परिभाषित APIs और interfaces डिज़ाइन करने में मदद करता है। सॉफ्टवेयर के अलग-अलग हिस्से आपस में कैसे बात करेंगे, यह तय करते समय उपयोगी है।
browser-testing-with-devtools
107kआपके एजेंट को असली browsers में सीधे code टेस्ट करने में मदद करता है। जिस माहौल में चीज़ इस्तेमाल होगी, वहाँ वह कैसे चलती है यह जाँचने और errors व performance की समस्याएँ ढूंढने के लिए उपयोगी है।
code-review-and-quality
107kकई पहलुओं पर detailed code reviews करता है। नए changes merge करने से पहले quality सुनिश्चित करने और आगे की समस्याएँ रोकने के लिए उपयोगी है।
code-simplification
107kCode को सरल बनाता है ताकि उसे समझना और maintain करना आसान हो। जब code काम तो करता है पर बहुत जटिल हो गया हो, तब clarity बढ़ाने के लिए उपयोगी है।
मिलती-जुलती skills
knowledge-automation
394kयह आपके एजेंट को एक नियमित काम सेट करने देती है जो समय-सारणी पर Knowledge vault में नई सामग्री जोड़ता है, फिर जांचता है कि काम चल रहा है।
knowledge-source-ingest
394kयह आपके एजेंट को चैट चैनल, फ़ीड या मेलबॉक्स से आई नई चीज़ों से Knowledge vault अपडेट रखने देती है, बिना वह दोबारा जोड़े जो पहले से है।
benchmark
280kयह आपके एजेंट को code की speed और performance नापने में मदद करता है। यह पक्का करने और धीमेपन की समस्याएँ ढूँढने में काम आता है।