• शेड्यूल, API कॉल, और GitHub इवेंट्स के आधार पर अपने-आप चलने वाली cloud-based code automation सुविधा, जो Anthropic infrastructure पर चलती है
  • Routines, prompt, repository, connector, trigger से मिलकर बनती हैं, और लैपटॉप बंद होने पर भी चलती रहती हैं
  • Triggers तीन प्रकार के हैं: schedule, API, GitHub events, और एक ही routine में कई triggers जोड़े जा सकते हैं
  • इन्हें web, CLI, desktop app से बनाया और manage किया जा सकता है, और GitHub·Slack·Linear जैसे external service connectors के जरिए काम किए जा सकते हैं
  • यह Pro और उससे ऊपर के plans में उपलब्ध है, और अभी research preview चरण में है, इसलिए फीचर्स और API spec बदल सकते हैं

Routines से काम automate करें

  • Claude Code Routines शेड्यूल, API कॉल, और GitHub इवेंट्स के आधार पर अपने-आप चलने वाले saved code configurations हैं, जो Anthropic द्वारा प्रबंधित cloud infrastructure पर चलते हैं
  • Routines, prompt, repository, connectors के सेट से बनती हैं, और लैपटॉप बंद होने पर भी चलती रहती हैं
  • Trigger types तीन हैं: schedule, API, GitHub events, और एक routine में कई triggers जोड़े जा सकते हैं
  • Routines, Pro, Max, Team, Enterprise plans में उपलब्ध हैं, और web या CLI(/schedule) से बनाई और manage की जा सकती हैं
  • यह अभी research preview चरण में है, इसलिए इसका व्यवहार और API spec बदल सकते हैं

Routines के प्रमुख उपयोग के मामले

  • Backlog maintenance: schedule trigger हर रात issue tracker की जाँच करके label जोड़ता है, assignee तय करता है, और Slack summary पोस्ट करता है
  • Alert classification: monitoring tool एरर होने पर API trigger कॉल करता है, routine stack trace का विश्लेषण करके fix PR बनाती है
  • Custom code review: GitHub trigger PR बनने पर चलकर security·performance·style review comments अपने-आप जोड़ता है
  • Deployment verification: CD pipeline deployment के बाद API trigger कॉल करती है, routine smoke tests और logs की जाँच करती है
  • Documentation sync: साप्ताहिक schedule trigger merged PRs को स्कैन करके बदले हुए API से जुड़े docs update PR बनाती है
  • Library porting: PR merge होने पर GitHub trigger बदलावों को दूसरी language SDK में port करता है

Routine बनाने का तरीका

  • Routines को web, desktop app, CLI में बनाया जा सकता है, और सभी interfaces एक ही cloud account से जुड़े होते हैं
  • Routine बनाते समय settings: prompt, repository, environment, connector, trigger
  • Routine एक automated execution session है, जो permission approval के बिना commands चला सकती है और connectors कॉल कर सकती है
  • Routines व्यक्तिगत account के स्वामित्व में होती हैं, team के साथ share नहीं होतीं। इनके runs account की daily limit में गिने जाते हैं
  • GitHub, Slack, Linear जैसे connectors के जरिए किए गए सभी काम आपके जुड़े हुए account के नाम से दिखेंगे
  • Web में बनाना

    • claude.ai/code/routines पर New routine क्लिक करें
    • Routine का नाम और prompt लिखें, model चुनें
    • Repository चुनें: GitHub repository जोड़ें, claude/ prefix branch का उपयोग करें
    • Environment चुनें: network access, environment variables, install scripts सेट करें
    • Trigger चुनें: schedule, GitHub event, API में से चुनें या मिलाकर इस्तेमाल करें
    • Connectors की समीक्षा करें और अनावश्यक items हटाएँ
    • Create क्लिक करने पर routine बन जाती है और तुरंत चलाई जा सकती है
  • CLI में बनाना

    • /schedule कमांड से interactive creation किया जा सकता है (/schedule daily PR review at 9am)
    • CLI में केवल schedule trigger बनाया जा सकता है, API·GitHub triggers web में जोड़ने होंगे
    • /schedule list, /schedule update, /schedule run से manage किया जा सकता है
  • Desktop app में बनाना

    • Schedule page में New remote task चुनें
    • Local scheduled tasks और routines को साथ में दिखाया जाता है

Trigger configuration

  • किसी routine में schedule, API, GitHub triggers में से एक या अधिक हो सकते हैं
  • Triggers को कभी भी जोड़ा या हटाया जा सकता है
  • Schedule trigger

    • timezone के अनुसार hourly, daily, weekdays, weekly execution
    • न्यूनतम execution interval 1 घंटा है
    • CLI में /schedule update से cron expression सेट किया जा सकता है
  • API trigger

    • हर routine के लिए HTTP endpoint दिया जाता है, authentication Bearer token से होता है
    • POST request पर नई session बनती है और URL लौटाया जाता है
    • Request body के text field से execution context भेजा जा सकता है
    • Token केवल एक बार दिखाया जाता है, और इसे फिर से जारी या revoke किया जा सकता है
    • /fire endpoint के लिए experimental-cc-routine-2026-04-01 beta header आवश्यक है
  • GitHub trigger

    • जुड़े हुए repository में event होने पर अपने-आप execution
    • Claude GitHub App install होना आवश्यक है
    • केवल web UI में configure किया जा सकता है
    • Events अधिक होने पर प्रति घंटा limit लागू होती है
    • Supported events

      • Pull request, Push, Release, Issues, Discussion आदि लगभग 20 GitHub events supported हैं
      • हर event, opened, closed, edited जैसी detailed actions पर प्रतिक्रिया दे सकता है
    • PR filtering

      • author, title, body, branch, label, merged status, fork status आदि के आधार पर filtering
      • उदाहरण: is draft=false → केवल review के लिए तैयार PR पर execution, labels include needs-backport → केवल खास label होने पर trigger
    • Session mapping

      • हर event independent session के रूप में चलता है, events के बीच session reuse नहीं हो सकता

Routine management

  • Routine list में क्लिक करने पर detail page खुलता है
  • Repository, connectors, prompt, triggers, run history देखी जा सकती है
  • Runs देखना और interaction

    • हर run session form में खुलता है, जहाँ changes review करना, PR बनाना, और conversation जारी रखना संभव है
    • Session menu में rename, archive, delete किया जा सकता है
  • Editing और control

    • Run now से तुरंत चलाएँ
    • Repeats toggle से pause/resume
    • Edit routine में नाम, prompt, repository, environment, triggers संशोधित करें
    • Delete करने पर पुरानी sessions बनी रहती हैं

Repository और branch permissions

  • Routines के लिए GitHub authentication आवश्यक है, /web-setup से connection सेट करें
  • डिफ़ॉल्ट रूप से केवल claude/ prefix branches पर push किया जा सकता है
  • Allow unrestricted branch pushes option से यह सीमा हटाई जा सकती है

Connectors

  • Routines, MCP connectors के जरिए Slack, Linear, Google Drive जैसी external services तक पहुँच सकती हैं
  • डिफ़ॉल्ट रूप से सभी connected connectors शामिल होते हैं, इसलिए अनावश्यक items हटाने की सलाह दी जाती है
  • Settings > Connectors या /schedule update से manage किया जा सकता है

Environment settings

  • हर routine cloud environment में चलती है
  • Environment, network access, environment variables, install scripts को नियंत्रित करता है
  • API access, dependency installation, network restrictions आदि पहले से configure किए जा सकते हैं

Usage और limits

  • Routine runs सामान्य sessions की तरह ही subscription usage से कटते हैं
  • हर account के लिए daily run limit होती है
  • अतिरिक्त usage की अनुमति होने पर billed overage runs संभव हैं
  • Usage claude.ai/settings/usage पर देखी जा सकती है

संबंधित सामग्री

अभी कोई टिप्पणी नहीं है.

अभी कोई टिप्पणी नहीं है.